graphql / express-graphql

Create a GraphQL HTTP server with Express.
MIT License
6.34k stars 538 forks source link

express-graphql as a graphiql server for another endpoint? #295

Open Magneticmagnum opened 7 years ago

Magneticmagnum commented 7 years ago

I'm using this express-graphql repo to setup a graphiql server that first fetches an introspection schema from another graphql endpoint.

My setup looks like this:

___________________                 _________________________
| graphql-express |  ========>    | graphql server endpoint |
|    graphiQL     |   introspects |                         |
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯                ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ 

I can get the schema served fine using this setup via introspection However, is it possible to test the queries as well from the graphiQL endpoint?

asiandrummer commented 7 years ago

@Magneticmagnum you should be able to, by using the embedded GraphiQL app initialized by passing graphiql: true option - could you try that?

levans002 commented 7 years ago

Hi @Magneticmagnum,

Just curious if you were able to get this working? I'm hoping to do the same

enisdenjo commented 1 year ago

This library has been deprecated and this repo will be archived soon. It has been superseded by graphql-http.

Furthermore, if you seek a fully-featured, well-maintained and performant server - I heavily recommend GraphQL Yoga!