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

How to support querying for null? #116

Closed
joewood opened this issue Jan 19, 2016 · 5 comments
Closed

How to support querying for null? #116

joewood opened this issue Jan 19, 2016 · 5 comments
Labels

Comments

@joewood
Copy link

joewood commented Jan 19, 2016

GraphQL doesn't have a null literal, it relies on the defaultValue for the args input field.
Is there a recommended literal value in graphql-sequelize that is used to interpret as null by the resolver function? What's the best way to support querying for null?

@mickhansen
Copy link
Owner

I haven't run into this problem yet so there's no official solution from the library.
Open to ideas :)

@joewood
Copy link
Author

joewood commented Jan 19, 2016

Right now I'm using special Boolean arguments, then hooking them up in the before callback.
I think when GraphQL will support null literals soon: graphql/graphql-spec#83. So, I assume GraphQL-Serialize will pass those nulls on to the where structure.

@legomind
Copy link
Contributor

looks like null literals are part of the relay spec now.

@mickhansen
Copy link
Owner

@legomind Indeed

@stale
Copy link

stale bot commented Apr 23, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 23, 2020
@stale stale bot closed this as completed Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants