I am trying to figure out if DGraph supports a way to pass in a list of UIDs via the GraphQL Variables API call.
Examples:
This unfortunately does not work -
query GetStuff($uids: string = "0xa105,0xa11d,0xa101") {
operators(func:type("Thing"))
@filter(uid($uids))
{ uid name }
}
This does work, but it doesn’t use variables:
query GetStuff {
operators(func:type("Thing"))
@filter(uid("0xa105","0xa11d","0xa101"))
{ uid name }
}
This also works, although the uids are not even strings here.
query GetStuff {
operators(func:type("Thing"))
@filter(uid(0xa105,0xa11d,0xa101))
{ uid name }
}
Any other alternatives that I can use? Or is there no escape other than building the big query string in my code and not using variables at all?