You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 26, 2023. It is now read-only.
Given I have a users connection that accepts an input type that accepts a where argument, this where input type has a couple of optional arguments. With GraphQL, you can query like so:
In my reason-apollo app, the user can specify these filters and so the where is constructed in my app and passed via the query's variables to the appropriate connection.
In order to construct the where, I have to specify all the Some and None values so it matches the type.
let where = {
username: Some({_eq: "lee"})
bot: None
}
Here's the problematic part, when I use this where as variables for the query, this None will be transformed to nil and send to the GraphQL server. As nil isn't valid input, the server will return a 500.
I'm quite new to the Reason and Apollo game, but I guess the fix for this case would be to use {} rather than nill as None value or remove the entries that have a None value.