1

I am using AWS appsync as grahpql server and I'd like to create a mutation API to response null value. So I need something like:

mutation{
   updateUser(name: String!): Void
}

But Void is not a scalar type in appsync. I have searched some solutions like Is it possible to not return any data when using a GraphQL mutation? but they are all about using apollo server. Is it possible to achieve null response in appsync?

Joey Yi Zhao
  • 37,514
  • 71
  • 268
  • 523

1 Answers1

0

I used primitive as an alternative:

mutation{ updateUser(name: String!): Boolean }

Always return true if successful and false otherwise.

tainos
  • 280
  • 1
  • 4
  • 14