-
Notifications
You must be signed in to change notification settings - Fork 1.8k
graphiql 5: Ensure storage and theme store values aren't shared between GraphiQL instances. Deprecate useTheme and useStorage hooks in favour of values from useGraphiQL and useGraphiQLActions hooks
#4074
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 51 commits
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
4fc0623
upd
dimaMachina 15df9ee
upd
dimaMachina 795921d
upd
dimaMachina 7a135fe
upd
dimaMachina 7d6e757
upd
dimaMachina 61998af
upd
dimaMachina 094b10f
upd
dimaMachina 32d327e
upd
dimaMachina 9780442
upd
dimaMachina 4f16377
upd
dimaMachina 9537b10
upd
dimaMachina a013ed0
upd
dimaMachina 5293f03
upd
dimaMachina 51b7aa4
polish
dimaMachina 1f7fda8
polish
dimaMachina d404dea
polish
dimaMachina 1df1b85
polish
dimaMachina a156c53
upd
dimaMachina b924a44
fix unit tests
dimaMachina 746c69d
upd
dimaMachina d60f8b2
upd
dimaMachina ba99d84
Update components.spec.tsx
dimaMachina e778163
Update components.spec.tsx
dimaMachina f39738c
Update components.spec.tsx
dimaMachina e0e59ca
set timeout to 6s
dimaMachina f4c84c1
set timeout to 7s
dimaMachina 53ac81c
set timeout to 7s
dimaMachina 74ba4d4
try 8
dimaMachina f2bb53b
15?
dimaMachina e3d5477
upd
dimaMachina 199643c
upd
dimaMachina 6fe0bbf
upd
dimaMachina 5e952df
upd
dimaMachina 2bfbe41
upd
dimaMachina deace26
upd
dimaMachina fc42ed9
upd
dimaMachina 4f419b4
try use mounted to avoid hydration errors with localStorage
dimaMachina a754437
try use mounted to avoid hydration errors with localStorage
dimaMachina f502beb
try use mounted to avoid hydration errors with localStorage
dimaMachina e753620
prettier and timeout
dimaMachina c1aea3d
upd
dimaMachina df894ac
temporarily add `graphql-language-service` in changeset to test esm s…
dimaMachina a1530c3
add esm.sh file to vite `lib.entry`
dimaMachina 43cf241
use minor semver
dimaMachina 4cd1831
add `@graphiql/react` to peerDeps for history and doc explorer
dimaMachina da59a03
upd
dimaMachina 9c6fa0c
Merge branch 'main' into fix-storage-multiple-instances
dimaMachina 1a11186
update esm example
dimaMachina e10ab55
prettier
dimaMachina 18d11ec
cleanup
dimaMachina b436808
better changeset
dimaMachina c89a2fb
Update .changeset/cold-ads-end.md
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,11 @@ | ||
| --- | ||
| '@graphiql/plugin-history': minor | ||
| '@graphiql/plugin-doc-explorer': minor | ||
| '@graphiql/react': minor | ||
| 'graphiql': minor | ||
| 'graphql-language-service': minor | ||
| --- | ||
|
|
||
| Ensure `storage` and `theme` store values aren't shared between GraphiQL instances. Deprecate `useTheme` and `useStorage` hooks in favour of values from `useGraphiQL` and `useGraphiQLActions` hooks | ||
|
|
||
| feat(`@graphiql/plugin-history`/`@graphiql/plugin-doc-explorer`): move `@graphiql/react` to `peerDependencies` | ||
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 |
|---|---|---|
|
|
@@ -42,18 +42,19 @@ | |
| { | ||
| "imports": { | ||
| "react": "https://esm.sh/[email protected]", | ||
| "react/jsx-runtime": "https://esm.sh/[email protected]/jsx-runtime", | ||
| "react/": "https://esm.sh/[email protected]/", | ||
|
|
||
| "react-dom": "https://esm.sh/[email protected]", | ||
| "react-dom/client": "https://esm.sh/[email protected]/client", | ||
| "@emotion/is-prop-valid": "data:text/javascript,", | ||
| "react-dom/": "https://esm.sh/[email protected]/", | ||
|
|
||
| "graphiql": "https://esm.sh/graphiql?standalone&external=react,react-dom,@graphiql/react,graphql", | ||
| "graphiql/": "https://esm.sh/graphiql/", | ||
| "@graphiql/plugin-explorer": "https://esm.sh/@graphiql/plugin-explorer?standalone&external=react,@graphiql/react,graphql", | ||
| "@graphiql/react": "https://esm.sh/@graphiql/react?standalone&external=react,react-dom,graphql,@emotion/is-prop-valid", | ||
| "@graphiql/react": "https://esm.sh/@graphiql/react?standalone&external=react,react-dom,graphql,@graphiql/toolkit,@emotion/is-prop-valid", | ||
|
|
||
| "@graphiql/toolkit": "https://esm.sh/@graphiql/toolkit?standalone&external=graphql", | ||
| "graphql": "https://esm.sh/[email protected]" | ||
| "graphql": "https://esm.sh/[email protected]", | ||
| "@emotion/is-prop-valid": "data:text/javascript," | ||
| } | ||
| } | ||
| </script> | ||
|
|
@@ -63,23 +64,7 @@ | |
| import { GraphiQL, HISTORY_PLUGIN } from 'graphiql'; | ||
| import { createGraphiQLFetcher } from '@graphiql/toolkit'; | ||
| import { explorerPlugin } from '@graphiql/plugin-explorer'; | ||
|
|
||
| import createJSONWorker from 'https://esm.sh/monaco-editor/esm/vs/language/json/json.worker.js?worker'; | ||
| import createGraphQLWorker from 'https://esm.sh/monaco-graphql/esm/graphql.worker.js?worker'; | ||
| import createEditorWorker from 'https://esm.sh/monaco-editor/esm/vs/editor/editor.worker.js?worker'; | ||
|
|
||
| globalThis.MonacoEnvironment = { | ||
| getWorker(_workerId, label) { | ||
| console.info('MonacoEnvironment.getWorker', { label }); | ||
| switch (label) { | ||
| case 'json': | ||
| return createJSONWorker(); | ||
| case 'graphql': | ||
| return createGraphQLWorker(); | ||
| } | ||
| return createEditorWorker(); | ||
| }, | ||
| }; | ||
| import 'graphiql/setup-workers/esm.sh'; | ||
|
|
||
| const fetcher = createGraphiQLFetcher({ | ||
| url: 'https://countries.trevorblades.com', | ||
|
|
||
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
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
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.