drupal-graphql / drupal-graphql/graphql

Error "Type Query must define one or more fields." with Apollo Gateway

Open
#886 2 comments 0 reactions 0 assignees View on GitHub
3.x
Dominant language
PHP
Stars
287
Forks
198
PR merge metrics
No merged PRs in 30d

Description

I'm using the GraphQL module, version 8.x-4.x, to run a federated query through [Apollo Federation Demo](https://github.com/apollographql/federation-demo), that's failing with the following error:

```
Encountered error when loading content at http://localhost:8000/graphql: request to http://localhost:8000/graphql failed, reason: connect ECONNREFUSED 127.0.0.1:8000
(node:1) UnhandledPromiseRejectionWarning: GraphQLSchemaValidationError: Type Query must define one or more fields.
at ApolloGateway.createSchema (/usr/src/app/node_modules/@apollo/gateway/dist/index.js:106:19)
at ApolloGateway. (/usr/src/app/node_modules/@apollo/gateway/dist/index.js:96:32)
at Generator.next ()
at fulfilled (/usr/src/app/node_modules/@apollo/gateway/dist/index.js:4:58)
at process._tickCallback (internal/process/next_tick.js:68:7)
```

Guys from Apollo are wondering if it comes from the gateway or not. Anyway, apparently empty Query type is not valid, see https://github.com/apollographql/apollo-server/issues/3100.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.