As the error decription suggest my query was wrong. Using something like:
http://localhost:3000/graphql?query={hello}
gives back the correct result.
I (wrongly) expected that the graphql endpoint were a GraphiQL UI.
Reading the docs GraphiQL can be enabled with
await server.register({
plugin: graphiqlHapi,
options: {
path: '/graphiql',
graphiqlOptions: {
endpointURL: '/graphql',
},
},
});
NOTE: Respect to the docs I needed to substitute register property with plugin property (hapi version 17.2.3).
I'll close this since it seems to be resolved, but let us know if we can do anything to further improve the documentation!
use playground: true,
const server = new ApolloServer({
introspection: true,
playground: true,
typeDefs,
resolvers,
})
Most helpful comment
use playground: true,
const server = new ApolloServer({ introspection: true, playground: true, typeDefs, resolvers, })