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

Empty lists should return [] instead of omitting the field #39

Closed
wravery opened this issue Feb 7, 2019 · 0 comments
Closed

Empty lists should return [] instead of omitting the field #39

wravery opened this issue Feb 7, 2019 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@wravery
Copy link
Contributor

wravery commented Feb 7, 2019

Bug in ModifiedResult where it handles the List modifier. If values.size() == 0 it doesn't emplace it. Relay seems to not like specifying empty selection sets in the compiled GraphQL, but for the sake of completeness it should probably do the same thing in Object::resolve when data.size() == 0. If all of the specified members are removed due to field errors we could still return an empty {} object and that would at least indicate that the object exists.

@wravery wravery added the bug Something isn't working label Feb 7, 2019
@wravery wravery self-assigned this Feb 7, 2019
@wravery wravery closed this as completed in 4b653f4 Feb 7, 2019
wravery added a commit that referenced this issue Feb 7, 2019
Fix #39, plus a lingering short-string-optimization bug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant