Cool, yes that works
But why does func: uid(0x2,0x3)
not work then? This also returns an array (I even added another person, so in my DB there is now also a person with UID 0x3 and still the query with func: uid(0x2,0x3)
is empty.
What I actually want to achieve, is to pass a list of uids to the DQL, as in this post.
So this is my schema with DQL:
POST http://localhost:8080/admin/schema
type Person {
id: ID!
firstName: String!
lastName: String!
}
type Query {
queryPersonCustom(ids: String!) : [Person] @custom(dql: """
query q($ids : string) {
queryPersonCustom(func: uid($ids)) {
id : uid
firstName : Person.firstName
lastName : Person.lastName
}
}
""")
}
and this is my concrete request:
POST http://localhost:8080/graphql
Content-Type: application/graphql
query {
queryPersonCustom(ids: "[0x2,0x3]") {
id
firstName
lastName
}
}
Again, the result is empty