Invalid use of comma

Report a GraphQL Bug

What edition and version of Dgraph are you using?

Edition:

  • SlashGraphQL
  • Dgraph (community edition/Dgraph Cloud)

If you are using the community edition or enterprise edition of Dgraph, please list the version:

Dgraph Version
v20.11.0-11-gb36b4862

Have you tried reproducing the issue with the latest release?

Not tested with 20.11.1 or master, just the latest available on Slash. My schema and data is too large to run the latest version or master version locally on Windows without a Unix server.

Steps to reproduce the issue (paste the query/schema if possible)

I can share full schema, but it is very large and has a lot of auth rules. Auth rules may have something to do with this error.

query:

query EventContacts {
  block1: queryEventOccurance(filter: {start: {le: "2021-02-22T15:35:00.000Z"}}) {
    event {
      id
      at(filter: {id: "0x27277"}) {
        id
      }
    }
  }
}

Expected behaviour and actual result.

Expected:

{
  "data": {
    "block1": [
      {
        "event": {
          "at": {
            "id": "0x27277"
          }
        }
      },
      ...

Actual:

{
  "errors": [
    {
      "message": "Dgraph query failed because Dgraph execution failed because line 18 column 36: Invalid use of comma."
    }
  ],
  ...

I can bypass this error by changing the filter to a list instead of depending on Dgraph to coerce to a list.

as(filter: {id:["0x27277"]})

I thought this was fixed on my version, but maybe that is a later version.


Helpful debug advice:

To help debug errors like this, is there anyway to see the converted DQL from a GraphQL query/mutation? That would really be helpful if there was a way to enter a GraphQL query/mutation and output it to DQL from my schema. The rewriter functions have this DQL, just not sure how to get it without possibly going to look in the logs somewhere (which is not available in Slash)