Returning null Values in GraphQL Responses #1717
giordano-newday
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm part of a team using DGS for our backend, Apollo Client on Android and a custom GraphQL client on iOS. We've encountered an issue: DGS omits fields in the response when they are nullable and have a null value. This hasn't been a problem for our current setup, but we're exploring using Apollo Client for iOS, which expects these fields to be present and returns a decode error when they're absent.
From our understanding of the GraphQL spec, nullable fields should be included in responses as null. Is there a configuration in DGS that allows for this behaviour?
A link to the Apollo Client Swift question: apollographql/apollo-ios#3216
Beta Was this translation helpful? Give feedback.
All reactions