-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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/reactto 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=>useEditorStorefeat(@graphiql/react): migrate React context to zustand. ReplaceuseExecutionContextwithuseExecutionStorehook and replaceuseEditorContextwithuseEditorStorehook #3946 -
useExecutionContext=>useExecutionStorefeat(@graphiql/react): migrate React context to zustand. ReplaceuseExecutionContextwithuseExecutionStorehook and replaceuseEditorContextwithuseEditorStorehook #3946 -
usePluginContext=>usePluginStorefeat(@graphiql/react): migrate React context to zustand, replaceusePluginContextwithusePluginStorehook #3945 -
useSchemaContext=>useSchemaStorefeat(@graphiql/react): migrate React context to zustand, replaceuseSchemaContextwithuseSchemaStorehook #3943 -
useStorageContext=>useStoragefeat(@graphiql/react): migrate React context to zustand, replaceuseStorageContextwithuseStoragehook #3942 -
useHistoryContext=>useHistoryfeat(@graphiql/plugin-history): migrate React context to zustand, replaceuseHistoryContextwithuseHistory,useHistoryActionshooks #3935 -
useExplorerContext=>useDocExplorerfeat(@graphiql/plugin-doc-explorer): migrate React context to zustand, replaceuseExplorerContextwithuseDocExploreranduseDocExplorerActionshooks #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,headersandresponseprops 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
keyMapwas removed
- document
- push both on stack e.g.
Personandnamehttps://discord.com/channels/625400653321076807/966768858402816020/1379076825036095610 - update short cuts text per OS https://discord.com/channels/625400653321076807/966768858402816020/1379081212865548319
- remove
onClickReferencein variables editor - store
onClickReferencein Reactrefand access asref.currentinuseEffect - 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
Robrey27 and gabrielcsapoleebyron, gabrielcsapo and jonathanawesomebenjie, thomasheyenbrock, leebyron, havaguernicoopengo, Robrey27 and 1 more