-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
avoid
useMemo
with empty array []
since React can't guarantee sta…
…ble reference, + lint restrict syntax for future mistakes (#3063) * avoid `useMemo` with empty array `[]` since React can't guarantee stable reference, + lint restrict syntax for future mistakes * fix migration * prettify
- Loading branch information
1 parent
392e193
commit 5792aaa
Showing
6 changed files
with
86 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@graphiql/plugin-code-exporter': patch | ||
'@graphiql/plugin-explorer': patch | ||
--- | ||
|
||
avoid `useMemo` with empty array `[]` since React can't guarantee stable reference, + lint restrict syntax for future mistakes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,7 +100,7 @@ been removed and where you can find them now: | |
The `GraphiQL` component in `[email protected]` was a class component. That allowed | ||
easy access to its props, state and methods by attaching a ref to it like so: | ||
|
||
```jsx | ||
```tsx | ||
import { createGraphiQLFetcher } from '@graphiql/toolkit'; | ||
import { GraphiQL } from 'graphiql'; | ||
import React from 'react'; | ||
|
@@ -228,16 +228,16 @@ components that can be passed as children to the `GraphiQL` components and | |
override certain parts of the UI: | ||
|
||
- `GraphiQL.Logo`: Overrides the "logo" at the top right of the screen. By | ||
default it contains the text "Graph*i*QL". | ||
- `GraphiQL.Toolbar`: Overrides the toolbar next to the query editor. By default | ||
if contains buttons for prettifying the current editor contents, merging | ||
fragment definitions into the operation definition and copying the contents of | ||
the query editor to the clipboard. Note that the default buttons will not be | ||
shown when passing this component as child to `GraphiQL`, instead it will show | ||
the children you pass to `GraphiQL.Toolbar`. The execute button will always be | ||
shown. If you want to keep the default buttons and add additional buttons you | ||
can use the `toolbar` prop. | ||
- `GraphiQL.Footer`: Adds a section below the response editor. By default this | ||
default, it contains the text "Graph*i*QL". | ||
- `GraphiQL.Toolbar`: Overrides the toolbar next to the query editor. By | ||
default, if contains buttons for prettifying the current editor contents, | ||
merging fragment definitions into the operation definition and copying the | ||
contents of the query editor to the clipboard. Note that the default buttons | ||
will not be shown when passing this component as child to `GraphiQL`, instead | ||
it will show the children you pass to `GraphiQL.Toolbar`. The execute button | ||
will always be shown. If you want to keep the default buttons and add | ||
additional buttons you can use the `toolbar` prop. | ||
- `GraphiQL.Footer`: Adds a section below the response editor. By default, this | ||
won't show up in the UI. | ||
|
||
Here is a list of all the static properties that have been removed and their | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters