Open
Description
GraphiQL Next path proposal
Hi, I am one of the current GraphiQL maintainers, and I’m excited to share the future GraphiQL 4 and 5 proposal, which will introduce:
- Migration to Zustand for state management (replacing React context)
- Migration to Monaco-Editor/Monaco-GraphQL (replacing CodeMirror)
These versions will be released sequentially. Below is the detailed roadmap:
GraphiQL 3.9 x React-Compiler/Vite
- Migrate to Vite (Done in #3826, pending release)
- Compile GraphiQL source code (Done in #3826, pending release)
GraphiQL 4 x React 19/New Tabs UI/ESM-based CDN examples
- [graphiql] Update graphiql-react to support React 19 #3850
- Upgrade
@headless/react
to v2 ingraphiql-react
- Upgrade
- New tab design (Merged in v4 alpha, visible in GraphQL Hive)
GraphiQL 4.1 x Zustand
-
Extract plugins into separate packages (issue #2904):
- Explorer plugin
- History plugin
-
Migrate from React context to Zustand (issue #2904)
-
useEditorContext
=>useEditorStore
feat(@graphiql/react): migrate React context to zustand. ReplaceuseExecutionContext
withuseExecutionStore
hook and replaceuseEditorContext
withuseEditorStore
hook #3946 -
useExecutionContext
=>useExecutionStore
feat(@graphiql/react): migrate React context to zustand. ReplaceuseExecutionContext
withuseExecutionStore
hook and replaceuseEditorContext
withuseEditorStore
hook #3946 -
usePluginContext
=>usePluginStore
feat(@graphiql/react): migrate React context to zustand, replaceusePluginContext
withusePluginStore
hook #3945 -
useSchemaContext
=>useSchemaStore
feat(@graphiql/react): migrate React context to zustand, replaceuseSchemaContext
withuseSchemaStore
hook #3943 -
useStorageContext
=>useStorage
feat(@graphiql/react): migrate React context to zustand, replaceuseStorageContext
withuseStorage
hook #3942 -
useHistoryContext
=>useHistory
feat(@graphiql/plugin-history): migrate React context to zustand, replaceuseHistoryContext
withuseHistory
,useHistoryActions
hooks #3935 -
useExplorerContext
=>useDocExplorer
feat(@graphiql/plugin-doc-explorer): migrate React context to zustand, replaceuseExplorerContext
withuseDocExplorer
anduseDocExplorerActions
hooks #3940
-
-
Ensure all tests pass
GraphiQL 5 x Monaco-Editor/Monaco-GraphQL
- Migrate to Monaco-Editor/Monaco-GraphQL (I did POC in 2023 in #3234)
- graphiql 5: Remove
query
,variables
,headers
andresponse
props from<GraphiQL />
#3735 - Ensure all tests pass
- remove UMD builds
- clickable definition in hover popup https://discord.com/channels/625400653321076807/966768858402816020/1378977355309256817
- adjust variable colors in graphiql monaco theme https://discord.com/channels/625400653321076807/966768858402816020/1378978886276222976
- include how works go to definition in migration guide https://discord.com/channels/625400653321076807/966768858402816020/1379076101959188540
- document
keyMap
was removed
- document
- push both on stack e.g.
Person
andname
https://discord.com/channels/625400653321076807/966768858402816020/1379076825036095610 - update short cuts text per OS https://discord.com/channels/625400653321076807/966768858402816020/1379081212865548319
- remove
onClickReference
in variables editor - store
onClickReference
in Reactref
and access asref.current
inuseEffect
- allow override all plugins
Feel free to ask any relevant questions. The GraphQL TSC have indicated that if we're all in agreement they will approve my grant to work on this.
Let's get this built!
Dimitri