I am using a lambda as a resolver for a GraphQL Query from AppSync. When I run the Query from AppSync Console, the lambda works fine and returns the requested data, but on the AppSync console, the results show null values on the defined query arguments.
This is the schema:
type usersData {
email: String
photos: photos
}
type photos {
profile_photo: String
background_photo: String
}
type Query {
getUsersData(email: String!): usersData
}
schema {
query: Query
}
This is the query:
query getUsersData {
getUsersData(email: "lambda10@test.com") {
email
photos {
profile_photo
background_photo
}
}
}
This is the result from the lambda resolver:
{
"email": "lambda10@test.com",
"photos": {
"profile_photo": "./test1/test1",
"background_photo": "./test1/test1"
}
}
This is the result from the query on AppSync Console:
{
"data": {
"getUsersData": {
"email": null,
"photos": null
}
}
}
Any idea why is that?