Generated Queries not working

I’ve created a schema with a Topic type:

type Topic {
    id: ID!
    title: String!
}

My understanding is that this should generate a query called getTopic(uid), but when I try executing this in ratel as described here, I get an error.

My query:

query {
  getTopic(id: "0x1") {
    title
  }
}

I’ve also tried getTopic(topicID: "0x1") with the same result.

The error:

[
    {
      "message": "line 2 column 11: Got invalid keyword: id at root",
      "extensions": {
        "code": "ErrorInvalidRequest"
      }
    }
]

Thanks for any help you can provide.

1 Like

I believe you are confusing DQL with GraphQL. Ratel does not run GraphQL, you should use a GraphQL Client.

1 Like

Great, thanks for the quick response.

2 Likes