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

Nullable Record Fields Identified as NON_NULL Fields in GraphQL #1879

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

Comments

@ThisaruGuruge
Copy link
Member

Description:
When a record type has a nullable field, the GraphQL schema generated is considering them as NON_NULL fields.

Example:

type Person record {
    string? name;
};

The above record is mapped to the following type:

type Person {
    name: String!
}

But this should be;

type Person {
    name: String
}
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/0.5 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