-
Notifications
You must be signed in to change notification settings - Fork 1.8k
extract doc-explorer plugin from @graphiql/react
and publish as @graphiql/plugin-doc-explorer
package
#3916
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
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 8c6762f The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 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 |
The latest changes of this PR are available as canary in npm (based on the declared
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3916 +/- ##
==========================================
- Coverage 63.93% 63.92% -0.02%
==========================================
Files 35 35
Lines 3086 3085 -1
Branches 935 949 +14
==========================================
- Hits 1973 1972 -1
Misses 1108 1108
Partials 5 5
🚀 New features to boost your workflow:
|
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 doc-explorer plugin from @graphiql/react into its own package (@graphiql/plugin-doc-explorer) and updates related references accordingly. Key changes include updating import paths for various components and tests, updating the schema file extension in functions/graphql.ts, and adding a new ESLint rule for array operations.
Reviewed Changes
Copilot reviewed 61 out of 62 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
packages/graphiql-plugin-doc-explorer/src/components/deprecation-reason.tsx | Updated MarkdownContent import to use the published package |
packages/graphiql-plugin-doc-explorer/src/components/argument.tsx | Updated MarkdownContent import to use the published package |
packages/graphiql-plugin-doc-explorer/src/components/tests/type-documentation.spec.tsx | Updated SchemaContext import to use the published package |
packages/graphiql-plugin-doc-explorer/src/components/tests/doc-explorer.spec.tsx | Updated SchemaContext import to use the published package |
packages/graphiql-plugin-doc-explorer/README.md | Added header for the new package |
functions/graphql.ts | Changed schema import from a JavaScript to a CommonJS file |
.eslintrc.js | Added ESLint rule for preferring Array.some |
.changeset/gentle-houses-add.md | Documented version bumps and export removals |
Files not reviewed (1)
- packages/graphiql-plugin-doc-explorer/package.json: Language not supported
Comments suppressed due to low confidence (2)
functions/graphql.ts:13
- Verify that switching the schema import from '.js' to '.cjs' is intentional and that all build and runtime configurations support loading CommonJS modules.
import schema from '../packages/graphiql/test/schema.cjs';
.eslintrc.js:361
- [nitpick] Ensure that the new 'unicorn/prefer-array-some' rule is consistent with the project's code style guidelines and does not conflict with other ESLint rules in use.
'unicorn/prefer-array-some': 'error',
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 doc-explorer plugin from the @graphiql/react package into its own package (@graphiql/plugin-doc-explorer). It updates import paths across source and test files, adjusts the schema import in the GraphQL function, adds a new ESLint rule, and introduces a basic README for the new package.
Reviewed Changes
Copilot reviewed 61 out of 62 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
packages/graphiql-plugin-doc-explorer/src/components/deprecation-reason.tsx | Updated import to use '@graphiql/react'. |
packages/graphiql-plugin-doc-explorer/src/components/argument.tsx | Updated import to use '@graphiql/react'. |
packages/graphiql-plugin-doc-explorer/src/components/tests/type-documentation.spec.tsx | Updated import to use '@graphiql/react'. |
packages/graphiql-plugin-doc-explorer/src/components/tests/doc-explorer.spec.tsx | Updated import to use '@graphiql/react'. |
packages/graphiql-plugin-doc-explorer/README.md | Added initial README for the new package. |
functions/graphql.ts | Changed schema import from schema to testSchema. |
.eslintrc.js | Added the unicorn/prefer-array-some ESLint rule. |
.changeset/gentle-houses-add.md | Documented version changes for affected packages. |
Files not reviewed (1)
- packages/graphiql-plugin-doc-explorer/package.json: Language not supported
Comments suppressed due to low confidence (1)
functions/graphql.ts:13
- Confirm that using 'testSchema' as the schema in the handler is intentional for production usage. If it is meant only for testing, consider providing a separate production schema to avoid any unintended behavior.
import { testSchema } from '../packages/graphiql/test/schema.js';
similar to #3911
related #2904
part of #3874
can be published as @graphiql/react 0.32.0 since according semver 0.x treated as major changes
closes #3393
cc @acao I used your approach from #3393 with
referencePlugin
,schemaReference
andsetSchemaReference