Plugin: lifecycle hook to enable prettifying queries on load
See original GitHub issueWould it possible to auto prettify (opt-in, off by default) GraphGL calls when opening them in a GraphiQL window? I know there’s a button in the UI to do this, but I would prefer to have this done as soon as a GraphQL URL is opened, so the extra button click is not needed. Perhaps this can be configured by setting an options object on the graphiql
field? So instead of graphiql: true
one could set graphiql: { autoPrettify: true }
when for example setting up a express-graphql
server.
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Apollo Server plugin event reference - Apollo GraphQL Docs
This reference describes the lifecycle events that your custom Apollo Server plugin can respond to. Apollo Server fires two types of events that...
Read more >How to get WordPress' hooks/actions run sequence?
So let's gather some real data from a vanilla WordPress 5.7.2 install and the TwentyTwelve theme activated with only a single Text widget....
Read more >Amazon EC2 Auto Scaling lifecycle hooks
A popular use of lifecycle hooks is to control when instances are registered with Elastic Load Balancing. By adding a launch lifecycle hook...
Read more >Lifecycle hooks - Angular
If you need to make a change that inverts the expected data flow, you must trigger a new change detection cycle to allow...
Read more >typescript-react-query - GraphQL Code Generator
Without loading your GraphQL operations ( query , mutation ... This plugin generates React-Query Hooks with TypeScript typings.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
One of the great things about plugins is that they enables features like this that are only needed by a small subset of the GraphiQL users to be maintained outside of core, and yet still have deep integration. This keeps core lean, whilst reducing the need to fork the project, and makes it more powerful for its users.
@AGS- please review the PR, it won’t be on by default. It is opt-in.