You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.
If a resolver resolves undefined, the corresponding field is not present in the results' data, whereas according to specs the corresponding field should be null:
If result is null (or another internal value similar to null such as undefined or NaN), return null.
constresolvers={Query : {foo: ()=>of(undefined),bar: ()=>of('bar')}};constres=awaitgraphql(gql`{foo, bar}`,schema).toPromise();// actual: res = { data : { bar: 'bar'}};// expect: res = { data : { bar: 'bar', foo: null}};
The text was updated successfully, but these errors were encountered:
alexstrat
changed the title
Fields that resolve to undefined are not present in response
A field that resolves to undefined is not present in response
Feb 4, 2019
If a resolver resolves
undefined
, the corresponding field is not present in the results'data
, whereas according to specs the corresponding field should benull
:Made me run into compatibility issues such as apollographql/apollo-client#4267
The text was updated successfully, but these errors were encountered: