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

Support returning nulls from slices #619

Merged
merged 1 commit into from
Mar 14, 2019
Merged

Support returning nulls from slices #619

merged 1 commit into from
Mar 14, 2019

Conversation

vektah
Copy link
Collaborator

@vektah vektah commented Mar 13, 2019

Fixes #556

Allows returning null from slices that arent marked as NotNull by simply returning nil. Returning nil from a NotNull slice will keep the existing behaviour of returning an empty array.

I have:

  • Added tests covering the bug / feature (see testing)
  • Updated any relevant documentation (see docs)

@vektah vektah merged commit 932322b into master Mar 14, 2019
@vektah vektah deleted the nil-slices branch March 14, 2019 00:31
cgxxv pushed a commit to cgxxv/gqlgen that referenced this pull request Mar 25, 2022
Support returning nulls from slices
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.

2 participants