graphiql
graphiql copied to clipboard
[graphiql] - Upgrading to 3.1.0 causes runtime error
Is there an existing issue for this?
- [X] I have searched the existing issues
https://github.com/graphql/graphiql/issues/2763 - Already mention this issue, maybe a regression?
Current Behavior
After upgrading graphiql from 3.0.5 to 3.1.0 i'm getting the following runtime error in the browser console
Expected Behavior
Upgrading error should not throw error
Steps To Reproduce
No response
Environment
- GraphiQL Version: 3.1.0
- OS: macOS 14.1.2
- Browser: Chrome 120
- Bundler: Vite
reactVersion: 18.2.0graphqlVersion: 16.8.1
Anything else?
No response
Happens for us as well when using toolbar with additionalContent with a plugin which uses useEditorContext.
E.g. with using the plugin from this pull request: https://github.com/graphql/graphiql/pull/3055
I think if that is expected to happen then I feel like some documentation for the toolbar and adding a how-to do a toolbar plugin is missing.
If you add a no-op for the caller you can get a new error:
useEditorContext({
nonNull: true,
caller: () => {},
});