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

Allow graphql to pass through null values instead of ignoring them #268

Closed
wants to merge 1 commit into from

Conversation

lprhodes
Copy link

As set out in #133 and graphql/graphql-spec#83

@lprhodes
Copy link
Author

I'm not seeing any trailing whitespace - any ideas?

@leebyron
Copy link
Contributor

leebyron commented Feb 2, 2016

Thanks for investigating this. It looks like the linter is complaining about line 164 in values.js. I'd suggest configuring your IDE to trim trailing whitespace on save.

Right now it's very much intentional how null values are treated because of how the GraphQL spec is written. I'm still working on that spec change which will determine the runtime behavior changes.

fieldValue = field.defaultValue;
}
if (!isNullish(fieldValue)) {
} else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems like a mistake - did your unit tests pass or are we missing a test for this condition? As I read it, if a fieldValue is coerced to be undefined, then we set fieldValue to the default value, however never actually set it on the response object.

@wincent
Copy link
Contributor

wincent commented Jun 30, 2017

Closing this one due to staleness.

@wincent wincent closed this Jun 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants