Skip to content
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

[graphiql] fix types to allow overriding endpoint option #3727

Merged
merged 4 commits into from
Feb 6, 2025
Merged

Conversation

EmrysMyrddin
Copy link
Collaborator

@EmrysMyrddin EmrysMyrddin commented Jan 31, 2025

fixes #gw-117

Copy link

changeset-bot bot commented Jan 31, 2025

🦋 Changeset detected

Latest commit: 5f4a468

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 24 packages
Name Type
graphql-yoga Minor
@graphql-yoga/nestjs Major
@graphql-yoga/render-graphiql Major
@graphql-yoga/plugin-apollo-inline-trace Major
@graphql-yoga/apollo-managed-federation Major
@graphql-yoga/plugin-apollo-usage-report Major
@graphql-yoga/plugin-apq Major
@graphql-yoga/plugin-csrf-prevention Major
@graphql-yoga/plugin-defer-stream Major
@graphql-yoga/plugin-disable-introspection Major
@graphql-yoga/plugin-graphql-sse Major
@graphql-yoga/plugin-jwt Major
@graphql-yoga/plugin-persisted-operations Major
@graphql-yoga/plugin-prometheus Major
@graphql-yoga/plugin-response-cache Major
@graphql-yoga/plugin-sofa Major
apollo-federation-gateway-with-yoga Patch
apollo-subgraph-with-yoga Patch
graphql-lambda Patch
cloudflare-advanced Patch
cloudflare Patch
nextjs-app Patch
hello-world-benchmark Patch
@graphql-yoga/nestjs-federation Patch

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

Copy link
Contributor

github-actions bot commented Jan 31, 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 Jan 31, 2025

💻 Website Preview

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

Copy link
Contributor

github-actions bot commented Jan 31, 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% ✓ 507526      ✗ 0     
     data_received................................: 2.1 GB  14 MB/s
     data_sent....................................: 102 MB  680 kB/s
     http_req_blocked.............................: avg=1.59µs   min=1µs      med=1.37µs   max=2.55ms  p(90)=2.09µs   p(95)=2.3µs   
     http_req_connecting..........................: avg=11ns     min=0s       med=0s       max=2.46ms  p(90)=0s       p(95)=0s      
     http_req_duration............................: avg=367.43µs min=212.69µs med=334.84µs max=19.02ms p(90)=484.78µs p(95)=514.09µs
       { expected_response:true }.................: avg=367.43µs min=212.69µs med=334.84µs max=19.02ms p(90)=484.78µs p(95)=514.09µs
     ✓ { mode:graphql-jit }.......................: avg=286.98µs min=212.69µs med=270.73µs max=19.02ms p(90)=301.2µs  p(95)=313.01µs
     ✓ { mode:graphql-no-parse-validate-cache }...: avg=515.6µs  min=414.49µs med=488.32µs max=6.48ms  p(90)=549.02µs p(95)=605.93µs
     ✓ { mode:graphql-response-cache }............: avg=346.49µs min=263.96µs med=328.95µs max=7.01ms  p(90)=360.68µs p(95)=372.48µs
     ✓ { mode:graphql }...........................: avg=375.23µs min=280.56µs med=348.06µs max=14.62ms p(90)=397.69µs p(95)=437.48µs
     ✓ { mode:uws }...............................: avg=357.43µs min=275.3µs  med=338.8µs  max=7.06ms  p(90)=378.73µs p(95)=403.71µs
     http_req_failed..............................: 0.00%   ✓ 0           ✗ 253763
     http_req_receiving...........................: avg=33.27µs  min=17.47µs  med=32.8µs   max=3.1ms   p(90)=39.66µs  p(95)=42.61µs 
     http_req_sending.............................: avg=8.67µs   min=5.84µs   med=7.56µs   max=1.05ms  p(90)=11.14µs  p(95)=12.37µs 
     http_req_tls_handshaking.....................: avg=0s       min=0s       med=0s       max=0s      p(90)=0s       p(95)=0s      
     http_req_waiting.............................: avg=325.48µs min=182.21µs med=293.96µs max=18.86ms p(90)=442.17µs p(95)=469.89µs
     http_reqs....................................: 253763  1691.733369/s
     iteration_duration...........................: avg=586.12µs min=392.45µs med=548.56µs max=19.63ms p(90)=708.08µs p(95)=743.26µs
     iterations...................................: 253763  1691.733369/s
     vus..........................................: 1       min=1         max=1   
     vus_max......................................: 2       min=2         max=2   

Copy link
Collaborator

@ardatan ardatan left a comment

Choose a reason for hiding this comment

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

Should we have some tests to confirm the use case is working?

@EmrysMyrddin
Copy link
Collaborator Author

@ardatan It's not that easy to test it. And it was already working, it's more a fix in the types that was nor reflecting the underlying implementation.

@EmrysMyrddin EmrysMyrddin requested a review from ardatan February 6, 2025 12:51
Copy link
Collaborator

@ardatan ardatan left a comment

Choose a reason for hiding this comment

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

I added some tests. @EmrysMyrddin Could you check then we're good imo.

@EmrysMyrddin
Copy link
Collaborator Author

Perfect ! I was not aware we already had an e2e test with browser setup to test graphiql. That's pretty cool !
Thank you :-)

@ardatan ardatan merged commit 5fd15b8 into main Feb 6, 2025
25 checks passed
@ardatan ardatan deleted the fix/gw-117 branch February 6, 2025 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants