Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null values Should be Propagated to Upper Levels when NON_NULL Field Returns Null #2042

Closed
ThisaruGuruge opened this issue Oct 13, 2021 · 0 comments · Fixed by ballerina-platform/module-ballerina-graphql#446
Assignees
Labels
module/graphql Issues related to Ballerina GraphQL module Points/2 Priority/High Team/PCM Protocol connector packages related issues Type/Bug

Comments

@ThisaruGuruge
Copy link
Member

ThisaruGuruge commented Oct 13, 2021

Description:
According to the [spec](https://spec.graphql.org/June2018/#sec-Errors-and-Non-Nullability, when a field returned null, the GraphQL engine should check the field type whether it is a NON_NULL type or not. If the field type is NON_NULL, the field value cannot be null. In this case, the null value should be propagated to the immediate parent field. If that field type is also NON_NULL, the null value should be further propagated to the next parent object. This should be done until a nullable field is found.
Related #1988

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/graphql Issues related to Ballerina GraphQL module Points/2 Priority/High Team/PCM Protocol connector packages related issues Type/Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant