crystal
crystal copied to clipboard
Allow theming / branding of graphiql interface
I'm submitting a ...
- [ ] bug report
- [x] feature request
- [ ] question
PostGraphile version: 4.4.0
It would be nice to be able to easily do some lightweight theming of the graphiql interface. Primarily, this involves changing or removing the logo and title at the top, and changing or removing the links in the footer to Postgraphile documentation and examples.
I would be happy to have the footer contain a "Powered by Postgraphile" link, but the current links would confuse end users who would be looking for documentation about the product or site using graphiql rather than the underlying tool.
Another thing we want to be able to do is to pass in an authentication string so the user doesn't have to manually click the headers and paste it in. One easy way I can think of to do this is for the link to open graphiql include an anchor reference (i.e http://localhost:9500/graphiql#Bearer=eyaid.a123245.asdf8g ) and have the JS in graphiql look for that and put it in the header on init if it is found.
Also option to not expose new powerful features such as “analyse” that shouldn’t be seen by endusers, only developers.
Given that most graphql clients support arbitrary graphql server url in their UI, is there a reason to package graphiql with postgraphile?
It certainly is useful to quickly spin up a fully functional gql server plus a UI, but beyond that, isn't it preferable to keep the core package lightweight and let the consumer pick their own preferred graphql explorer ui? With extensions like Altair, a built-in ui is not as important now as it used to be.
It’s extremely convenient to have it included, plus we can (and have, and will continue to) add PostGraphile-specific enhancements to the GUI. It’s cool that Altair support our schema hot loading now though 😁 And you can always turn ours off (you can even exclude it from a webpack server build - see the postgraphile-lambda-example repo for details).
Aside: I’m one of the maintainers of GraphiQL now, and am planning to focus on customisation and extensibility.
Aside: I’m one of the maintainers of GraphiQL now, and am planning to focus on customisation and extensibility.
Splendid!