-
Notifications
You must be signed in to change notification settings - Fork 1.8k
extract history plugin from @graphiql/react
and publish as @graphiql/plugin-history
package
#3911
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
Conversation
🦋 Changeset detectedLatest commit: 17a2f37 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR extracts the history plugin from @graphiql/react and publishes it as a separate package (@graphiql/plugin-history), while also removing related exports and type definitions from @graphiql/react.
- Removed several exports and types (e.g. ExplorerContextProviderProps, HistoryContextProviderProps) from @graphiql/react.
- Commented out history integration within the execution context pending new plugin usage.
- Added configuration and build setups for the new @graphiql/plugin-history package.
Reviewed Changes
Copilot reviewed 27 out of 31 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
packages/graphiql-react/src/explorer/index.ts | Removed export for ExplorerContextProviderProps as part of the extraction. |
packages/graphiql-react/src/execution.tsx | Updated fetcher type-check and commented out history integration with a TODO note. |
packages/graphiql-react/src/editor/index.ts & context.tsx | Removed export/type for EditorContextProviderProps and streamlined context component type usage. |
packages/graphiql-plugin-history/* | Introduced new configuration files, exports, and updated context to support the new history plugin. |
examples/monaco-graphql-react-vite/* | Minor adjustments in config and updated loading UI. |
.changeset/*.md | Updated changeset to reflect the removal and extraction of history-related code. |
Files not reviewed (4)
- examples/monaco-graphql-react-vite/package.json: Language not supported
- package.json: Language not supported
- packages/graphiql-plugin-history/package.json: Language not supported
- packages/graphiql-plugin-history/tsconfig.json: Language not supported
Comments suppressed due to low confidence (1)
packages/graphiql-react/src/explorer/index.ts:20
- The removal of the ExplorerContextProviderProps export is intentional as part of the plugin extraction. Ensure that downstream consumers update their type references accordingly.
ExplorerContextProviderProps,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR extracts the history functionality from the @graphiql/react package into a standalone @graphiql/plugin-history package. Key changes include:
- Removal of history-related exports and types from the graphiql-react package.
- Adjustments in components and context files to remove direct history dependencies.
- Addition of new configuration, source, and test files for the plugin-history package.
Reviewed Changes
Copilot reviewed 27 out of 31 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
packages/graphiql-react/src/history/index.ts | Removed history exports in preparation for extraction |
packages/graphiql-react/src/explorer/index.ts | Removed export of ExplorerContextProviderProps |
packages/graphiql-react/src/execution.tsx | Commented out usage of useHistoryContext and improved fetcher check |
packages/graphiql-react/src/editor/* | Adjusted export types and context implementations |
packages/graphiql-plugin-history/* | Added new plugin code with corresponding configs, tests, and docs |
examples/monaco-graphql-react-vite/* | Minor improvements in styling and configuration |
.changeset/*.md | Updated changeset to reflect the extraction and type removals |
Files not reviewed (4)
- examples/monaco-graphql-react-vite/package.json: Language not supported
- package.json: Language not supported
- packages/graphiql-plugin-history/package.json: Language not supported
- packages/graphiql-plugin-history/tsconfig.json: Language not supported
Comments suppressed due to low confidence (1)
packages/graphiql-plugin-history/src/components.tsx:173
- The same ref (buttonRef) is used on both the 'Save' and 'Close' buttons, which may lead to unexpected behavior. Consider using separate refs or removing the ref if it is not needed for both elements.
<UnStyledButton type="button" ref={buttonRef} onClick={handleSave}>
The latest changes of this PR are available as canary in npm (based on the declared
|
related #2904
part of #3874
can be published as
@graphiql/react
0.31.0 since according semver0.x
treated as major changes