Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upGraphQL variables don't seem to be supported in arrays #2272
Comments
pawanrawal
self-assigned this
Mar 28, 2018
pawanrawal
added
the
investigate
label
Mar 28, 2018
This comment has been minimized.
This comment has been minimized.
jmaeso
commented
Jun 26, 2018
Same happened me, trying the function for getting near locations:
It returns: As a workaround:
Hope this help someone |
jmaeso
unassigned
pawanrawal
Jun 26, 2018
This comment has been minimized.
This comment has been minimized.
JeffersonH44
commented
Jul 24, 2018
I've got the same problem using ratel, my current dgraph version is 1.0.6, this is in some way my query:
and I'm getting this error:
|
This comment has been minimized.
This comment has been minimized.
I don't think this is supported. You'd have to run this in 2-queries. |
srfrog
added
enhancement
and removed
investigate
labels
Nov 29, 2018
This comment has been minimized.
This comment has been minimized.
Just a quick note that @jmaeso 's solution unfortunately does not work with Query:
Variables:
This returns nothing, because dgraph is probably treating |
This comment has been minimized.
This comment has been minimized.
Just an update on this thread.
That's the right way to use geo arguments in Dgraph, for who's trying that. For the Inequality issue you can always use [ ] and set multiple values. Like so:
However I do not understand why eq does not work with GraphQL Variables in this case. |
srfrog
added
bug
and removed
enhancement
labels
Feb 6, 2019
This comment has been minimized.
This comment has been minimized.
Unfortunately, the geo array is not supported. The eq var array is a bug. |
ondrowan commentedMar 27, 2018
•
edited by dgraph-bot
If you suspect this could be a bug, follow the template.
1.0.4
Either I'm doing something wrong or GraphQL variables that are used in arrays don't work. And since it's not possible to define variable as arrays, it also seems impossible to do something like: