Khan / genqlient

a truly type-safe Go GraphQL client
MIT License
1.07k stars 107 forks source link

Can't parse a valid graphql schema #250

Closed zhaoyi0113 closed 1 year ago

zhaoyi0113 commented 1 year ago

I have a schema file as:

query getChat($id: ID!) {
  getChat(id: $id) {
    id
    msg
    topic
  }
}

when I run go run github.com/Khan/genqlient --init, it gives me an error: schema.graphql:1: invalid schema: Unexpected Name "query".

I wonder what the correct schema I should use.