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

Update non_null.ex with details about adding and removing #1146

Merged
merged 2 commits into from
Jan 20, 2022

Conversation

alanvardy
Copy link
Contributor

Hello and thank you for the project.

I was confused around adding and removing non_null now that the correctness is more strictly enforced with 1.7.0. I received clarification from @benwilson512 and hope that this edit helps. I can reword this if anyone can think of a better way of putting it.

2022-01-20_10-28

@benwilson512 benwilson512 merged commit db9ccd9 into absinthe-graphql:master Jan 20, 2022
@benwilson512
Copy link
Contributor

Thank you!

@maartenvanvliet
Copy link
Contributor

There's a bit of nuance here.

Adding non_null/1 to an input type is a breaking change, whereas adding non_null/1 to an output type is not.
The inverse also holds, removing non_null from an input type is non-breaking, removing non_null/1 from an output type is breaking.

@benwilson512
Copy link
Contributor

@maartenvanvliet ah yes good point, I was coming at it from the angle of inputs given the recent bug fix. I'll make an update to handle both situations.

@alanvardy
Copy link
Contributor Author

Very interesting, thank you @maartenvanvliet and @benwilson512 !

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.

3 participants