Skip to content

294 handle optional parameters #310

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

Merged
merged 1 commit into from
Sep 25, 2019
Merged

294 handle optional parameters #310

merged 1 commit into from
Sep 25, 2019

Conversation

vojtapol
Copy link
Member

@vojtapol vojtapol commented Sep 13, 2019

Resolves #294

The issue describes the problem. This simple fix would make the library more consistent with graphql-java. It would also allow for easy differentiation between absent and null arguments.

null -> argument was omitted from the query
Optional.empty() -> argument was not omitted and it was set to GraphQL null

It makes it possible to use GraphQL null in mutations for clearing values without using the environment.containsArgument workaround.

@vojtapol vojtapol changed the title 294 Handle optional parameters 294 handle optional parameters Sep 13, 2019
@chantellosejo
Copy link

Someone accept this person's PR. It's super valuable.

@vojtapol
Copy link
Member Author

@oliemansm Is there anything blocking this PR? I can update it with any requested changes if necessary.

@oliemansm oliemansm merged commit a03f31a into graphql-java-kickstart:master Sep 25, 2019
@vojtapol vojtapol mentioned this pull request May 21, 2020
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Absence of Optional arguments are represented with Optional.empty() instead of null
3 participants