Skip to content

fix(deps): update dependency @graphiql/plugin-explorer to v5 #4033

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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented May 18, 2025

This PR contains the following updates:

Package Change Age Confidence
@graphiql/plugin-explorer (source) ^3.0.0 -> ^5.0.0 age confidence

Release Notes

graphql/graphiql (@​graphiql/plugin-explorer)

v5.1.1

Compare Source

Patch Changes

v5.1.0

Compare Source

Minor Changes
Patch Changes

v5.0.0

Compare Source

Major Changes
  • #​3990 27e7eb6 Thanks @​dimaMachina! - - allow multiple independent instances of GraphiQL on the same page

    • store onClickReference in query editor in React ref
    • remove onClickReference from variable editor
    • fix shortcut text per OS for run query in execute query button's tooltip and in default query
    • allow override all default GraphiQL plugins
    • adjust operation argument color to be purple from GraphiQL v2 on dark/light theme
  • #​4009 4936492 Thanks @​dimaMachina! - separate store actions from state, add useGraphiQLActions state

  • #​4002 2d9faec Thanks @​dimaMachina! - remove UMD builds

Patch Changes
  • #​3949 0844dc1 Thanks @​dimaMachina! - - replace onCopyQuery hook with copyQuery function

    • replace onMergeQuery hook with mergeQuery function
    • replace onPrettifyEditors hook with prettifyEditors function
    • remove fetcher prop from SchemaContextProvider and schemaStore and add fetcher to executionStore
    • add onCopyQuery and onPrettifyQuery props to EditorContextProvider
    • remove exports (use GraphiQLProvider)
      • EditorContextProvider
      • ExecutionContextProvider
      • PluginContextProvider
      • SchemaContextProvider
      • StorageContextProvider
      • ExecutionContextType
      • PluginContextType
    • feat(@​graphiql/react): migrate React context to zustand:
      • replace useExecutionContext with useExecutionStore hook
      • replace useEditorContext with useEditorStore hook
    • prefer getComputedStyle over window.getComputedStyle
  • #​3234 86a96e5 Thanks @​dimaMachina! - Migration from Codemirror to Monaco Editor

    Replacing codemirror-graphql with monaco-graphql

    Support for comments in Variables and Headers editors

v4.0.6

Compare Source

Patch Changes

v4.0.5

Compare Source

Patch Changes

v4.0.4

Compare Source

Patch Changes

v4.0.3

Compare Source

Patch Changes

v4.0.2

Compare Source

Patch Changes

v4.0.1

Compare Source

Patch Changes

v4.0.0

Compare Source

Major Changes

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the dependencies Pull requests that update a dependency file label May 18, 2025
Copy link

codesandbox bot commented May 18, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@ardatan ardatan force-pushed the renovate/major-graphiql-monorepo branch from 69d0817 to 2f88b7f Compare May 18, 2025 14:53
@renovate renovate bot force-pushed the renovate/major-graphiql-monorepo branch from 2f88b7f to b84de73 Compare May 18, 2025 15:00
@ardatan ardatan force-pushed the renovate/major-graphiql-monorepo branch from b84de73 to 8cb9f6a Compare May 18, 2025 15:48
Copy link
Contributor

github-actions bot commented May 18, 2025

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
@graphql-yoga/graphiql 4.4.1-alpha-20250728153604-2e6981dc9f8987167d2d47f8058a7243c07d0b5b npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-apollo-usage-report 0.10.2-alpha-20250728153604-2e6981dc9f8987167d2d47f8058a7243c07d0b5b npm ↗︎ unpkg ↗︎

Copy link
Contributor

github-actions bot commented May 18, 2025

Apollo Federation Subgraph Compatibility Results

Federation 1 Support Federation 2 Support
_service🟢
@key (single)🟢
@key (multi)🟢
@key (composite)🟢
repeatable @key🟢
@requires🟢
@provides🟢
federated tracing🟢
@link🟢
@shareable🟢
@tag🟢
@override🟢
@inaccessible🟢
@composeDirective🟢
@interfaceObject🟢

Learn more:

Copy link
Contributor

github-actions bot commented May 18, 2025

💻 Website Preview

The latest changes are available as preview in: https://pr-4033.graphql-yoga.pages.dev

Copy link
Contributor

github-actions bot commented May 18, 2025

✅ Benchmark Results

     ✓ no_errors{mode:graphql}
     ✓ expected_result{mode:graphql}
     ✓ no_errors{mode:graphql-jit}
     ✓ expected_result{mode:graphql-jit}
     ✓ no_errors{mode:graphql-response-cache}
     ✓ expected_result{mode:graphql-response-cache}
     ✓ no_errors{mode:graphql-no-parse-validate-cache}
     ✓ expected_result{mode:graphql-no-parse-validate-cache}
     ✓ no_errors{mode:uws}
     ✓ expected_result{mode:uws}

     checks.......................................: 100.00% ✓ 446618      ✗ 0     
     data_received................................: 1.8 GB  12 MB/s
     data_sent....................................: 90 MB   599 kB/s
     http_req_blocked.............................: avg=1.6µs    min=1.01µs   med=1.38µs   max=319.91µs p(90)=2.08µs   p(95)=2.28µs  
     http_req_connecting..........................: avg=2ns      min=0s       med=0s       max=135.85µs p(90)=0s       p(95)=0s      
     http_req_duration............................: avg=447.11µs min=283.82µs med=412.59µs max=20.68ms  p(90)=552.32µs p(95)=576.99µs
       { expected_response:true }.................: avg=447.11µs min=283.82µs med=412.59µs max=20.68ms  p(90)=552.32µs p(95)=576.99µs
     ✓ { mode:graphql-jit }.......................: avg=359.32µs min=283.82µs med=341.15µs max=20.68ms  p(90)=375.48µs p(95)=389.9µs 
     ✓ { mode:graphql-no-parse-validate-cache }...: avg=575.37µs min=476.72µs med=550.25µs max=6.57ms   p(90)=594.9µs  p(95)=672.76µs
     ✓ { mode:graphql-response-cache }............: avg=418.22µs min=333.11µs med=400.3µs  max=8.09ms   p(90)=436.01µs p(95)=449.63µs
     ✓ { mode:graphql }...........................: avg=442.17µs min=349.42µs med=412.19µs max=17.41ms  p(90)=473.07µs p(95)=525.49µs
     ✓ { mode:uws }...............................: avg=478.07µs min=372.43µs med=438.28µs max=10.93ms  p(90)=488.93µs p(95)=568.06µs
     http_req_failed..............................: 0.00%   ✓ 0           ✗ 223309
     http_req_receiving...........................: avg=34.63µs  min=17.23µs  med=33.52µs  max=2.99ms   p(90)=40.83µs  p(95)=44.16µs 
     http_req_sending.............................: avg=9.18µs   min=6.06µs   med=8.27µs   max=953.91µs p(90)=11.63µs  p(95)=12.91µs 
     http_req_tls_handshaking.....................: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting.............................: avg=403.28µs min=250.66µs med=369.84µs max=20.57ms  p(90)=507.99µs p(95)=531.07µs
     http_reqs....................................: 223309  1488.715074/s
     iteration_duration...........................: avg=666.63µs min=460.49µs med=628.26µs max=21.23ms  p(90)=775.55µs p(95)=805.46µs
     iterations...................................: 223309  1488.715074/s
     vus..........................................: 1       min=1         max=1   
     vus_max......................................: 2       min=2         max=2   

@renovate renovate bot force-pushed the renovate/major-graphiql-monorepo branch 3 times, most recently from 1ab7023 to efb8a21 Compare May 27, 2025 18:17
@renovate renovate bot force-pushed the renovate/major-graphiql-monorepo branch from b3ac6d9 to 4ee85d0 Compare July 21, 2025 17:18
@renovate renovate bot changed the title fix(deps): update dependency @graphiql/plugin-explorer to v4 fix(deps): update dependency @graphiql/plugin-explorer to v5 Jul 21, 2025
Copy link
Contributor Author

renovate bot commented Jul 21, 2025

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

@ardatan ardatan force-pushed the renovate/major-graphiql-monorepo branch from c8a7340 to 428467c Compare July 28, 2025 14:14
Copy link

@Copilot Copilot AI left a 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 updates the @graphiql/plugin-explorer dependency from v3.0.0 to v5.1.1, which is a major version update that includes significant breaking changes in the GraphiQL ecosystem. The update involves migrating from CodeMirror to Monaco Editor and transitioning from React Context to Zustand for state management.

Key changes include:

  • Major dependency updates for GraphiQL components and related packages
  • Refactoring of the YogaGraphiQL component to use the new GraphiQL v5 API
  • Updates to browser integration tests to work with the new Monaco Editor selectors
  • Removal of patches and deprecated dependencies

Reviewed Changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/graphiql/package.json Updates GraphiQL dependencies to v5 and removes deprecated packages
packages/graphiql/src/YogaGraphiQL.tsx Refactors component to use new GraphiQL v5 API and removes deprecated patterns
packages/graphql-yoga/integration-tests/browser.spec.ts Updates test selectors for Monaco Editor and adds debugging capabilities
patches/@graphiql__react@0.20.4.patch Removes patch file that's no longer needed
examples/nextjs-app/integration-tests/nextjs-app.spec.ts Updates test assertion for new GraphiQL title format
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

isHeadersEditorEnabled
defaultEditorToolsVisibility
initialQuery={deprecatedInitialQuery}
defaultHeaders={deprecatedInitialHeaders}
Copy link
Preview

Copilot AI Jul 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The prop name defaultHeaders should be initialHeaders to match the GraphiQL v5 API. Based on the deprecation warnings in the type definitions, this appears to be using an incorrect prop name.

Suggested change
defaultHeaders={deprecatedInitialHeaders}
initialHeaders={deprecatedInitialHeaders}

Copilot uses AI. Check for mistakes.

import 'graphiql/style.css';
import '@graphiql/plugin-explorer/style.css';
import { GraphiQL, GraphiQLProps } from 'graphiql';
import { DocumentNode, Kind, parse } from 'graphql';
Copy link
Preview

Copilot AI Jul 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Kind import appears to be unused in this file. Consider removing it to keep imports clean.

Copilot uses AI. Check for mistakes.

Comment on lines +331 to +339
// @ts-expect-error - value is not null
() => !!window.document.querySelector('[data-uri*="response"] textarea')?.value?.trim(),
);
const resultContents = await page.evaluate(() => {
return window.document
.querySelector('.graphiql-response .CodeMirror-code')
?.textContent?.trim()
.replaceAll('\u00A0', ' ');
return (
window.document
.querySelector('[data-uri*="response"] textarea')
// @ts-expect-error - value is not null
?.value?.trim()
Copy link
Preview

Copilot AI Jul 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Instead of using @ts-expect-error, consider using optional chaining or proper type assertions. The comment suggests confidence that value is not null, so a non-null assertion (!) would be more appropriate.

Copilot uses AI. Check for mistakes.

@ardatan ardatan requested a review from enisdenjo July 29, 2025 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant