crystal icon indicating copy to clipboard operation
crystal copied to clipboard

Allow theming / branding of graphiql interface

Open deinspanjer opened this issue 6 years ago • 4 comments

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.

deinspanjer avatar May 16 '19 19:05 deinspanjer

Also option to not expose new powerful features such as “analyse” that shouldn’t be seen by endusers, only developers.

benjie avatar May 17 '19 09:05 benjie

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.

bitpod-io avatar May 29 '19 05:05 bitpod-io

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.

benjie avatar May 30 '19 22:05 benjie

Aside: I’m one of the maintainers of GraphiQL now, and am planning to focus on customisation and extensibility.

Splendid!

bitpod-io avatar Jun 04 '19 06:06 bitpod-io