Ha! I got it working:
This is the schema / 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: type(Person)) @filter(uid($ids)) {
id : uid
firstName : Person.firstName
lastName : Person.lastName
}
}
""")
}
and this is the query:
POST http://localhost:8080/graphql
Content-Type: application/graphql
query {
queryPersonCustom(ids: "[0x2,0x3]") {
id
firstName
lastName
}
}
About your question:
If I use queryPersonCustom(ids: "0x2,0x3") { ... } I get the error message resolving queryPersonCustom failed because got error while rewriting DQL query because strconv.ParseUint: parsing “0x2,0x3”: invalid syntax.
And the same error message is also shown if I use "0x2,0x3" as default value in the DQL query in the schema and leave out the ids parameter in the query execution.
Thank you so much for your quick support @MichelDiz !