apollo-server icon indicating copy to clipboard operation
apollo-server copied to clipboard

Graphiql doesn't work

Open Ibrahim9595 opened this issue 9 years ago • 2 comments

I've setup the graphql-tools from Apollo and the graphiql doesn't show results it gives me plain html any idea how to fix this

Ibrahim9595 avatar Jul 08 '17 19:07 Ibrahim9595

is it like the #449 issue ?

bwlt avatar Jul 10 '17 09:07 bwlt

I just ran into this. The fix for me was that I hadn't set the endpointURL correctly.

before (broken, just seeing lots of red html in the results box)

app.use('/gql', bodyParser.json(), graphqlExpress({ schema: schema }))
app.use('/iql', graphiqlExpress({ endpointURL: '/iql' }));

after (fixed)

app.use('/gql', bodyParser.json(), graphqlExpress({ schema: schema }))
app.use('/iql', graphiqlExpress({ endpointURL: '/gql' }));

shkurkin avatar Jul 19 '17 07:07 shkurkin