rafiki
rafiki copied to clipboard
Allow null in GraphQL response
Replace maybeValue
with inputMaybeValue
(available in newer versions of graphql-code-generator) to allow null in GraphQL responses.
https://github.com/interledger/rafiki/blob/main/packages/backend/codegen.yml#L11
This is also necessary to return null
from a __resolveType
resolver
https://www.apollographql.com/docs/apollo-server/v2/schema/unions-interfaces/#resolving-a-union
:confused: We appear to already be able to return null
from resolvers.
I even tried rebasing on:
- https://github.com/interledger/rafiki/pull/921
This is also necessary to return
null
from a__resolveType
resolver https://www.apollographql.com/docs/apollo-server/v2/schema/unions-interfaces/#resolving-a-union
And we don't current have any unions in our schema