-
Notifications
You must be signed in to change notification settings - Fork 1.8k
graphiql 5: Remove query
, variables
, headers
and response
props from <GraphiQL />
#3735
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 57 commits
Commits
Show all changes
141 commits
Select commit
Hold shift + click to select a range
fec285b
changeset pre enter alpha
dimaMachina 3c1a345
[graphiql-react/graphiql] new looks of tabs (#3644)
dimaMachina 5d90e0e
[2] GraphiQL x Vite v5 (#3679)
dimaMachina 11aacd0
[3] remove unused webpack deps (#3681)
dimaMachina 955573a
Merge branch 'main' into graphiql-v4
dimaMachina 8efb873
[4] update graphql to `16.9.0` and use vite `define` configuration to…
dimaMachina 0fdd9b9
remove `data-testid="graphiql-container"` (#3688)
dimaMachina c5b3aa2
commit `pre.json` until `graphiql-v4` will be added to list of author…
dimaMachina 61fc27a
remove `graphiql-v4` from release.yml
dimaMachina 09e7004
[v4] remove `disableTabs` option (#3687)
dimaMachina 11bacb8
commit `pre.json`
dimaMachina 445bf02
add `graphiql-v4` in release.yml
dimaMachina d34246e
Merge branch 'main' into graphiql-v4
dimaMachina 82bc961
[v4] prefer `location` over `window.location` and prefer `navigator` …
dimaMachina 93453fc
[v4] remove `build.sh` and `checkgit.sh` (#3694)
dimaMachina 2005871
[v4] test umd build only on ci, locally test cdn.ts (#3693)
dimaMachina bf3ea52
[v4] convert graphiql e2e server to ESM (#3697)
dimaMachina bb70347
Merge branch 'main' into graphiql-v4
dimaMachina 5e43d2b
[v4] update changeset for changed exports (#3700)
dimaMachina 95668f5
Merge branch 'main' into graphiql-v4
dimaMachina 00415d2
[v4] generate types with `vite-plugin-dts` (#3702)
dimaMachina 8ff87d7
[v4] use `vite build --watch` instead of `vite` for `dev` script beca…
dimaMachina 343dd59
[v4] remove graphiql default export (#3706)
dimaMachina 4e26b74
Merge branch 'main' into graphiql-v4
dimaMachina db181b2
[v4] fix netlify deploy (#3708)
dimaMachina 9baf1f0
change `style.css` imports (#3709)
dimaMachina 7afb4be
Update poor-ghosts-jump.md
dimaMachina 1a6d63d
Version Packages (alpha) (#3689)
acao 27bbc51
[v4] show tabs even there is only 1 tab (#3713)
dimaMachina 3c901c1
[v4] Remove `toolbar.additionalContent` and `toolbar.additionalCompon…
dimaMachina cb4553d
Version Packages (alpha) (#3714)
acao cc2808f
[v4] use `position: absolute` for `.graphiql-logo` class (#3716)
dimaMachina bf0c4e7
[v4] remove `createComponentGroup` utility in favour `Object.assign` …
dimaMachina 15fff26
Version Packages (alpha) (#3718)
acao d3fc470
[v4] fix merge conflicts with `main` (#3719)
dimaMachina b468046
Merge branch 'main' into graphiql-v4
dimaMachina 79f3abf
[v4] fix scrollbar appearing in sidebar (#3720)
dimaMachina 9d28035
Version Packages (alpha) (#3723)
acao 4609e00
Merge branch 'main' into graphiql-v4
dimaMachina 6587675
Merge branch 'main' into graphiql-v4
dimaMachina f2a6b39
Merge branch 'main' into graphiql-v4
dimaMachina f8b719f
style: Don't convert single \n to <br> (#3414)
leonardehrenfried 196e9a0
[v4] some refactoring (#3726)
dimaMachina 3bcbda4
Merge branch 'main' into graphiql-v4
dimaMachina a1a5208
[v4] polish `tabs.cy` tests, remove `.graphiql-session` class (#3728)
dimaMachina 99c64ac
Merge branch 'main' into graphiql-v4
dimaMachina 167629f
fix tests
dimaMachina 360a038
[v4] rollback `position: absolute` style for `.graphiql-logo` because…
dimaMachina 8d9d469
Merge branch 'main' into graphiql-v4
dimaMachina fd0e25f
Version Packages (alpha) (#3725)
acao 058d1d8
Merge branch 'main' into graphiql-v4
dimaMachina c966fa1
Merge branch 'main' into graphiql-v4
dimaMachina 8dbddb5
Add support for onPrettifyQuery callback to enable customised query f…
dimaMachina e10e96c
Merge branch 'main' into graphiql-v4
dimaMachina 3a2580e
Version Packages (alpha) (#3732)
acao 053db6c
aa
dimaMachina 47874bf
aa
dimaMachina d2daab6
Apply suggestions from code review
dimaMachina 0cebb37
Merge branch 'graphiql-5' into remove-controlled-props
dimaMachina 28caa5f
upd
dimaMachina e5ce244
upd
dimaMachina 4814361
Delete .changeset/breezy-chicken-crash.md
dimaMachina b2f6e08
Delete .changeset/add-on-prettify-callback.md
dimaMachina 4b07a3a
Delete .changeset/few-steaks-clap.md
dimaMachina 10c2a87
Delete .changeset/flat-lies-heal.md
dimaMachina 8d263b9
Delete .changeset/gentle-bugs-mix.md
dimaMachina 6bb8d39
Delete .changeset/green-pugs-worry.md
dimaMachina eb240d4
Delete .changeset/good-vans-refuse.md
dimaMachina a68ddfe
Delete .changeset/metal-glasses-bow.md
dimaMachina 45ffb18
Delete .changeset/hungry-spiders-cheat.md
dimaMachina aaf4255
Delete .changeset/old-zebras-knock.md
dimaMachina a123911
Delete .changeset/orange-rivers-draw.md
dimaMachina 22aa205
Delete .changeset/olive-mice-hide.md
dimaMachina baa5d0f
Delete .changeset/pink-moose-shake.md
dimaMachina e93d129
Delete .changeset/poor-ghosts-jump.md
dimaMachina cffdcb7
Delete .changeset/red-papayas-fly.md
dimaMachina 76acce0
Delete .changeset/rich-jobs-kick.md
dimaMachina bb89fa9
Delete .changeset/serious-forks-sip.md
dimaMachina f1813ac
Delete .changeset/strong-ears-bake.md
dimaMachina b7adb42
Delete .changeset/spotty-bulldogs-confess.md
dimaMachina 80c204f
Delete .changeset/thick-adults-leave.md
dimaMachina 1424b48
Delete .changeset/weak-dancers-jog.md
dimaMachina a80135d
Delete .changeset/wicked-seas-laugh.md
dimaMachina fa041aa
Delete .changeset/thirty-spoons-call.md
dimaMachina 553a455
Update .changeset/nasty-cows-train.md
dimaMachina 291c415
Update resources/custom-words.txt
dimaMachina a96bc2f
rollback
dimaMachina 6c44e39
rollback
dimaMachina 7659557
rollback
dimaMachina a945daf
upd
dimaMachina d4caaa3
upd
dimaMachina 161dd5c
upd
dimaMachina 20a9fdd
upd
dimaMachina a225600
upd
dimaMachina 77721c7
upd
dimaMachina d1ef47c
upd
dimaMachina eeefee7
prettier
dimaMachina da295d5
upd
dimaMachina d3e1b67
upd
dimaMachina 0ba00ad
upd
dimaMachina f928178
upd
dimaMachina 1cf8c37
upd
dimaMachina 6b82183
upd
dimaMachina 96901c1
upd
dimaMachina 772a03a
upd
dimaMachina 6ebee47
try isMounted
dimaMachina 2882a7d
Update packages/graphiql/cypress/e2e/headers.cy.ts
dimaMachina c34a281
Update packages/graphiql/src/e2e.ts
dimaMachina 4bb6fd6
fix tabs tests
dimaMachina 3c3a9d1
try
dimaMachina 773cbc6
improve use did update
dimaMachina 68824ea
Merge branch 'graphiql-5' into remove-controlled-props
dimaMachina 11fd479
upd
dimaMachina 5f591e7
upd changeset
dimaMachina 1e66006
upd
dimaMachina e821d2d
upd
dimaMachina 3889e6c
upd
dimaMachina 40b748a
upd
dimaMachina d50f84f
upd
dimaMachina 52356c6
upd
dimaMachina 4e507b3
upd
dimaMachina 6528684
upd
dimaMachina 5c3677f
upd
dimaMachina 762cad2
upd
dimaMachina 1ab533a
upd
dimaMachina 8f0ce0e
upd
dimaMachina 4f0408d
upd
dimaMachina c2a78fd
upd
dimaMachina 6d304bb
upd
dimaMachina 42955d1
upd
dimaMachina 2f45ef8
upd
dimaMachina 2db9489
upd
dimaMachina 04a9495
upd
dimaMachina f95e867
upd
dimaMachina 0460780
upd
dimaMachina f73e478
Merge branch 'graphiql-5' into remove-controlled-props
dimaMachina bbfeaa6
upd
dimaMachina 9e63b43
upd error message and changeset
dimaMachina 060732e
Update packages/graphiql/src/GraphiQL.spec.tsx
dimaMachina 08b9f82
Update packages/graphiql/src/GraphiQL.spec.tsx
dimaMachina d3c6cfd
improve tsdoc comment
dimaMachina File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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/react": minor | ||
"graphiql": minor | ||
--- | ||
|
||
Add support for `onPrettifyQuery` callback to enable customised query formatting |
This file contains hidden or 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,12 @@ | ||
--- | ||
'@graphiql/plugin-code-exporter': major | ||
--- | ||
|
||
`style.css` import was changed | ||
|
||
## Migration | ||
|
||
```diff | ||
-import '@graphiql/plugin-code-exporter/dist/style.css'; | ||
+import '@graphiql/plugin-code-exporter/style.css'; | ||
``` |
This file contains hidden or 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,5 @@ | ||
--- | ||
'graphiql': major | ||
--- | ||
|
||
show tabs even there is only 1 tab |
This file contains hidden or 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,7 @@ | ||
--- | ||
'@graphiql/react': minor | ||
'@graphiql/plugin-explorer': minor | ||
'@graphiql/plugin-code-exporter': minor | ||
--- | ||
|
||
generate types with `vite-plugin-dts` |
This file contains hidden or 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,19 @@ | ||
--- | ||
'graphiql': major | ||
--- | ||
|
||
remove default export | ||
|
||
## Migration | ||
|
||
### Before | ||
|
||
```jsx | ||
import GraphiQL from 'graphiql' | ||
``` | ||
|
||
### After | ||
|
||
```jsx | ||
import { GraphiQL } from 'graphiql' | ||
``` |
This file contains hidden or 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,12 @@ | ||
--- | ||
'@graphiql/react': major | ||
--- | ||
|
||
`style.css` import was changed | ||
|
||
## Migration | ||
|
||
```diff | ||
-import '@graphiql/react/dist/style.css'; | ||
+import '@graphiql/react/style.css'; | ||
``` |
This file contains hidden or 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,5 @@ | ||
--- | ||
'graphiql': major | ||
--- | ||
|
||
remove `disableTabs` option |
This file contains hidden or 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,5 @@ | ||
--- | ||
'graphiql': major | ||
--- | ||
|
||
remove `data-testid="graphiql-container"` |
This file contains hidden or 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,5 @@ | ||
--- | ||
'graphiql': patch | ||
--- | ||
|
||
update graphql to `16.9.0` and use vite `define` configuration to remove development code from cdn bundle |
This file contains hidden or 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,8 @@ | ||
--- | ||
'@graphiql/react': major | ||
'graphiql': major | ||
--- | ||
|
||
- Remove `query`, `variables`, `headers` and `response` props in `<GraphiQL />`, `<GraphiQLProvider />` and `<EditorContextProvider />` | ||
dimaMachina marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- Remove `useSynchronizeValue` hook |
This file contains hidden or 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,5 @@ | ||
--- | ||
'graphiql': minor | ||
--- | ||
|
||
remove `.graphiql-session` class |
This file contains hidden or 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': patch | ||
'@graphiql/react': patch | ||
--- | ||
|
||
Respect Markdown format: ignore single newline |
This file contains hidden or 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,9 @@ | ||
--- | ||
'@graphiql/plugin-code-exporter': patch | ||
'@graphiql/plugin-explorer': patch | ||
'@graphiql/react': patch | ||
--- | ||
|
||
use `vite build --watch` instead of `vite` for `dev` script because we don't need development server for them | ||
|
||
do not use `vite-plugin-dts` when generating umd build |
This file contains hidden or 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,5 @@ | ||
--- | ||
'graphiql': patch | ||
--- | ||
|
||
use `position: absolute` for `.graphiql-logo` class |
This file contains hidden or 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,13 @@ | ||
--- | ||
'@graphiql/plugin-explorer': major | ||
--- | ||
|
||
`style.css` import was changed | ||
|
||
## Migration | ||
|
||
```diff | ||
-import '@graphiql/plugin-explorer/dist/style.css'; | ||
+import '@graphiql/plugin-explorer/style.css'; | ||
``` | ||
|
This file contains hidden or 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,49 @@ | ||
{ | ||
"mode": "pre", | ||
"tag": "alpha", | ||
"initialVersions": { | ||
"cm6-graphql": "0.0.15", | ||
"codemirror-graphql": "2.0.13", | ||
"graphiql": "3.4.0", | ||
"@graphiql/plugin-code-exporter": "3.0.5", | ||
"@graphiql/plugin-explorer": "3.1.1", | ||
"@graphiql/react": "0.23.0", | ||
"@graphiql/toolkit": "0.9.2", | ||
"graphql-language-service": "5.2.2", | ||
"graphql-language-service-cli": "3.4.2", | ||
"graphql-language-service-server": "2.13.2", | ||
"monaco-graphql": "1.5.3", | ||
"vscode-graphql": "0.11.2", | ||
"vscode-graphql-execution": "0.2.6", | ||
"vscode-graphql-syntax": "1.3.6", | ||
"example-graphiql-webpack": "0.0.0", | ||
"example-monaco-graphql-nextjs": "0.0.0", | ||
"example-monaco-graphql-react-vite": "0.0.0", | ||
"example-monaco-graphql-webpack": "0.0.0" | ||
}, | ||
"changesets": [ | ||
"add-on-prettify-callback", | ||
"breezy-chicken-crash", | ||
"few-steaks-clap", | ||
"flat-lies-heal", | ||
"gentle-bugs-mix", | ||
"good-vans-refuse", | ||
"green-pugs-worry", | ||
"hungry-spiders-cheat", | ||
"metal-glasses-bow", | ||
"old-zebras-knock", | ||
"olive-mice-hide", | ||
"orange-rivers-draw", | ||
"pink-moose-shake", | ||
"poor-ghosts-jump", | ||
"red-papayas-fly", | ||
"rich-jobs-kick", | ||
"serious-forks-sip", | ||
"spotty-bulldogs-confess", | ||
"strong-ears-bake", | ||
"thick-adults-leave", | ||
"thirty-spoons-call", | ||
"weak-dancers-jog", | ||
"wicked-seas-laugh" | ||
] | ||
} |
This file contains hidden or 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/react': patch | ||
'graphiql': patch | ||
--- | ||
|
||
replace `overflow-y: scroll` with `overflow-y: auto` |
This file contains hidden or 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,23 @@ | ||
--- | ||
'graphiql': major | ||
--- | ||
|
||
migrate from `webpack` to `vite` | ||
|
||
changed exports | ||
|
||
```diff | ||
-graphiql/graphiql.css | ||
+graphiql/style.css | ||
``` | ||
|
||
changed cdn paths, `dist/index.umd.js` and `dist/style.css` are minified | ||
|
||
```diff | ||
-https://unpkg.com/graphiql/graphiql.js | ||
-https://unpkg.com/graphiql/graphiql.min.js | ||
+https://unpkg.com/graphiql/dist/index.umd.js | ||
-https://unpkg.com/graphiql/graphiql.css | ||
-https://unpkg.com/graphiql/graphiql.min.css | ||
+https://unpkg.com/graphiql/dist/style.css | ||
``` |
This file contains hidden or 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/react': patch | ||
'graphiql': patch | ||
--- | ||
|
||
rollback `position: absolute` style for `.graphiql-logo` because tabs will behind logo |
This file contains hidden or 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,7 @@ | ||
--- | ||
'@graphiql/react': patch | ||
'graphiql': patch | ||
--- | ||
|
||
- prefer `location` over `window.location` | ||
- prefer `navigator` over `window.navigator` |
This file contains hidden or 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,5 @@ | ||
--- | ||
'graphiql': patch | ||
--- | ||
|
||
use `right: var(--px-16)` instead of `right: 0` for `.graphiql-logo` |
This file contains hidden or 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,5 @@ | ||
--- | ||
'@graphiql/react': minor | ||
--- | ||
|
||
remove `createComponentGroup` utility in favour `Object.assign` |
This file contains hidden or 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,8 @@ | ||
--- | ||
"graphiql": major | ||
"@graphiql/react": minor | ||
--- | ||
|
||
- new looks of tabs | ||
|
||
- fix `disableTabs` when `Add tab` button is still shown |
This file contains hidden or 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,79 @@ | ||
--- | ||
'graphiql': major | ||
--- | ||
|
||
Remove `toolbar.additionalContent` and `toolbar.additionalComponent` props in favor of `GraphiQL.Toolbar` render props. | ||
|
||
## Migration from `toolbar.additionalContent` | ||
|
||
### Before | ||
|
||
```jsx | ||
<GraphiQL toolbar={{ additionalContent: <button>My button</button> }} /> | ||
``` | ||
|
||
### After | ||
|
||
```jsx | ||
<GraphiQL> | ||
<GraphiQL.Toolbar> | ||
{({ merge, prettify, copy }) => ( | ||
<> | ||
{prettify} | ||
{merge} | ||
{copy} | ||
<button>My button</button> | ||
</> | ||
)} | ||
</GraphiQL.Toolbar> | ||
</GraphiQL> | ||
``` | ||
|
||
## Migration from `toolbar.additionalComponent` | ||
|
||
### Before | ||
|
||
```jsx | ||
<GraphiQL | ||
toolbar={{ | ||
additionalComponent: function MyComponentWithAccessToContext() { | ||
return <button>My button</button>; | ||
}, | ||
}} | ||
/> | ||
``` | ||
|
||
### After | ||
|
||
```jsx | ||
<GraphiQL> | ||
<GraphiQL.Toolbar> | ||
{({ merge, prettify, copy }) => ( | ||
<> | ||
{prettify} | ||
{merge} | ||
{copy} | ||
<MyComponentWithAccessToContext /> | ||
</> | ||
)} | ||
</GraphiQL.Toolbar> | ||
</GraphiQL> | ||
``` | ||
|
||
--- | ||
|
||
Additionally, you can sort default toolbar buttons in different order or remove unneeded buttons for you: | ||
|
||
```jsx | ||
<GraphiQL> | ||
<GraphiQL.Toolbar> | ||
{({ prettify, copy }) => ( | ||
<> | ||
{copy /* Copy button will be first instead of default last */} | ||
{/* Merge button is removed from toolbar */} | ||
{prettify} | ||
</> | ||
)} | ||
</GraphiQL.Toolbar> | ||
</GraphiQL> | ||
``` |
This file contains hidden or 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,5 @@ | ||
--- | ||
'graphiql': patch | ||
--- | ||
|
||
replace `Tooltip`s in tabs with html `title="..."` attribute |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.