[graphiql] optional fetcher, user network configuration tab
- Dominant language
- TypeScript
- Stars
- 16.9k
- Forks
- 1.9k
- Avg merge
- 22h 45m
- Merged PRs (30d)
- 70
Description
A long requested feature, and what we envisioned for the sidebar plugin ecosystem a few years ago, is a place where users can configure their environments and settings for each environment
the network tab would provide a global setting for:
- default initial headers for each operation (that would show up in the headers tab)
- HTTP POST or GET for queries? [http spec](https://github.com/graphql/graphql-over-http/blob/main/spec/GraphQLOverHTTP.md#request)
- whether to persist the headers for that environment
- whether to add [`Accept: application/graphql-response+json`](https://github.com/graphql/graphql-over-http/blob/main/spec/GraphQLOverHTTP.md#body) transparently
the network tab would provide per-environment settings for:
- url
- default initial headers for each operation (that would show up in the headers tab)
- HTTP POST or GET for queries? [http spec](https://github.com/graphql/graphql-over-http/blob/main/spec/GraphQLOverHTTP.md#request)
- whether to persist the headers for that environment
How will this impact GraphiQL?
- `fetcher` becomes optional if `environments` prop is provided
- `environments` prop looks like `graphql-config` object but maybe stricter (difficult to normalise every pattern)
- `@graphiql/toolkit` `createGraphiQLFetcher()` becomes an internal detail if `environments` prop is provided?
Contributor guide
Assessment
This issue has not been assessed yet.