Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v4] Drop unused graphiql options defaultVariableEditorOpen and headerEditorEnabled #2776

Merged
merged 5 commits into from May 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fair-jeans-impress.md
@@ -0,0 +1,5 @@
---
'graphql-yoga': major
---

Drop unused graphiql options `defaultVariableEditorOpen` and `headerEditorEnabled`
12 changes: 0 additions & 12 deletions packages/graphql-yoga/src/plugins/useGraphiQL.ts
Expand Up @@ -15,12 +15,6 @@ export type GraphiQLOptions = {
* will use its own default query.
*/
defaultQuery?: string
/**
* Whether to open the variable editor by default. Defaults to `true`.
*
* @deprecated Obsolete option. Variable editor was opened by default
*/
defaultVariableEditorOpen?: boolean
/**
* The initial headers to render inside the header editor. Defaults to `"{}"`.
* The value should be a JSON encoded string, for example:
Expand All @@ -31,12 +25,6 @@ export type GraphiQLOptions = {
* More info there: https://developer.mozilla.org/en-US/docs/Web/API/Request/credentials
*/
credentials?: RequestCredentials
/**
* Whether the header editor is enabled. Defaults to `true`.
*
* @deprecated Obsolete option. Header editor was enabled by default
*/
headerEditorEnabled?: boolean
/**
* The title to display at the top of the page. Defaults to `"Yoga GraphiQL"`.
*/
Expand Down
3 changes: 2 additions & 1 deletion website/src/pages/docs/migration/_meta.json
Expand Up @@ -2,5 +2,6 @@
"migration-from-apollo-server": "Apollo Server",
"migration-from-express-graphql": "Express GraphQL",
"migration-from-yoga-v1": "Yoga v1",
"migration-from-yoga-v2": "Yoga v2"
"migration-from-yoga-v2": "Yoga v2",
"migration-from-yoga-v3": "Yoga v3"
}
24 changes: 24 additions & 0 deletions website/src/pages/docs/migration/migration-from-yoga-v3.mdx
@@ -0,0 +1,24 @@
import { PackageCmd } from '@theguild/components'

# Migration from Yoga V3

## Install the new NPM package

<PackageCmd packages={['graphql-yoga']} />

## Drop unused graphiql options `defaultVariableEditorOpen` and `headerEditorEnabled`

These two graphiql options were not used and are now removed completely.

```diff
import { createYoga } from 'graphql-yoga'
import { schema } from './schema'

const yoga = createYoga({
schema,
graphiql: {
- defaultVariableEditorOpen: false,
- headerEditorEnabled: false
}
})
```