99designs / 99designs/gqlgen

Schema does not support operation type \"query\"

Open
#2,365 6 comments 5 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
10.8k
Forks
1.3k
Avg merge
2d 36m
Merged PRs (30d)
26

Description

### What happened?

Trying to use the embedded playground and I'm just getting 422 unprocessable entity:

```json
{"errors":[{"message":"Schema does not support operation type \"query\"","locations":[{"line":2,"column":5}],"extensions":{"code":"GRAPHQL_VALIDATION_FAILED"}}],"data":null}
```

### What did you expect?

Operation `query` to work.

### Minimal graphql.schema and models to reproduce

https://github.com/Southclaws/storyden

Fire this up to reproduce, visit http://localhost:8000/graphql/ui for the graphiql interface that's failing.

The setup code for the graphql server is in [app/transports/graphql/graphql.go](https://github.com/Southclaws/storyden/blob/main/app/transports/graphql/graphql.go)

### versions
- `github.com/99designs/gqlgen v0.17.16`
- 1.19 latest

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.