Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

Is it possible to render graphiql documentation explorer on a separated page? #574

Open
yarick123 opened this issue Nov 15, 2019 · 6 comments

Comments

@yarick123
Copy link

Is it possible to render the graphiql documentation on a separated web page? Just the same, what makes graphiql, but without the possibility to send / explore GraphQL queries.

The reason is, that our graph(i)ql end points need special authentication. For the access to the documentation we do not need it.

@acao
Copy link
Member

acao commented Nov 28, 2019

if you want, you can follow the official graphiql examples for other ways of loading graphiql. implementing a special auth flow is as easy as passing in the fetcher function prop with headers/cookies you need. then with your http server you can serve all of this from a static html file, so you can choose whatever route you like and customize graphiql however you like! we will ship a generic middleware to be used in express/etc soon too, but for now it's common for folks to roll their own implementations. Id suggest the webpack + react route if its going to be widely used or customer facing

@yarick123
Copy link
Author

Thank for the answer. I hoped, that this functionality could be easily reused...

@acao
Copy link
Member

acao commented Nov 30, 2019

@yarick123 it will soon, I promise!

@acao
Copy link
Member

acao commented Nov 30, 2019

would you mind if i turn this into a feature request and keep it open?

@yarick123 yarick123 reopened this Nov 30, 2019
@yarick123
Copy link
Author

@acao of course I do not mind.

@enisdenjo
Copy link
Member

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!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants