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

Only well-formatted GraphQL-over-HTTP requests use 200 when accepting application/json #2675

Merged
merged 4 commits into from Apr 13, 2023

Conversation

enisdenjo
Copy link
Collaborator

@enisdenjo enisdenjo commented Apr 12, 2023

In light of graphql/graphql-http#62, fixes all notices from graphql/graphql-http#76.

All audits pass now: graphql/graphql-http@ed82b85.

@changeset-bot
Copy link

changeset-bot bot commented Apr 12, 2023

🦋 Changeset detected

Latest commit: 7a52521

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/common Patch
@graphql-yoga/nestjs Major
@graphql-yoga/node Patch
@graphql-yoga/render-graphiql Major
@graphql-yoga/plugin-apollo-inline-trace 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-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
functions Patch
hackernews 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

@@ -71,7 +71,7 @@
"@repeaterjs/repeater": "^3.0.4",
"@types/node": "18.15.11",
"graphql": "^16.0.1",
"graphql-http": "^1.7.2",
"graphql-http": "file:../../graphql-http-1.18.0-rc.1.tgz",
Copy link
Collaborator

Choose a reason for hiding this comment

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

👀

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah, graphql-http doesn't have alpha releases for PRs - so I just packed with graphql/graphql-http#76 and installed :D

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

will use actual release of course, but wanted to prepare Yoga so that it's immediately compatible ;)

@github-actions
Copy link
Contributor

Apollo Federation Subgraph Compatibility Results

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

Learn more:

@github-actions
Copy link
Contributor

🚀 Snapshot Release (rc)

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

Package Version Info
@graphql-yoga/apollo-link 1.8.0-rc-20230412155818-7a525212 npm ↗︎ unpkg ↗︎
@graphql-yoga/urql-exchange 1.8.0-rc-20230412155818-7a525212 npm ↗︎ unpkg ↗︎
@graphql-yoga/common 3.9.0-rc-20230412155818-7a525212 npm ↗︎ unpkg ↗︎
@graphql-yoga/graphiql 3.0.11-rc-20230412155818-7a525212 npm ↗︎ unpkg ↗︎
graphql-yoga 3.9.0-rc-20230412155818-7a525212 npm ↗︎ unpkg ↗︎
@graphql-yoga/nestjs 1.1.0-rc-20230412155818-7a525212 npm ↗︎ unpkg ↗︎
@graphql-yoga/nestjs-federation 1.1.0-rc-20230412155818-7a525212 npm ↗︎ unpkg ↗︎
@graphql-yoga/node 3.9.0-rc-20230412155818-7a525212 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-apollo-inline-trace 1.9.0-rc-20230412155818-7a525212 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-apq 1.9.0-rc-20230412155818-7a525212 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-csrf-prevention 1.5.0-rc-20230412155818-7a525212 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-defer-stream 1.9.0-rc-20230412155818-7a525212 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-disable-introspection 0.8.0-rc-20230412155818-7a525212 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-graphql-sse 1.5.0-rc-20230412155818-7a525212 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-persisted-operations 1.9.0-rc-20230412155818-7a525212 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-prometheus 1.9.0-rc-20230412155818-7a525212 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-response-cache 1.9.0-rc-20230412155818-7a525212 npm ↗︎ unpkg ↗︎
@graphql-yoga/plugin-sofa 1.9.0-rc-20230412155818-7a525212 npm ↗︎ unpkg ↗︎
@graphql-yoga/render-graphiql 3.9.0-rc-20230412155818-7a525212 npm ↗︎ unpkg ↗︎

@github-actions
Copy link
Contributor

github-actions bot commented Apr 12, 2023

✅ 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}

     checks.......................................: 100.00% ✓ 259432      ✗ 0     
     data_received................................: 1.1 GB  8.8 MB/s
     data_sent....................................: 52 MB   436 kB/s
     http_req_blocked.............................: avg=2µs      min=1.1µs    med=1.7µs    max=1.05ms   p(90)=2.5µs    p(95)=2.8µs   
     http_req_connecting..........................: avg=8ns      min=0s       med=0s       max=672.43µs p(90)=0s       p(95)=0s      
     http_req_duration............................: avg=623.4µs  min=306.21µs med=502.02µs max=30.45ms  p(90)=898.53µs p(95)=956.33µs
       { expected_response:true }.................: avg=623.4µs  min=306.21µs med=502.02µs max=30.45ms  p(90)=898.53µs p(95)=956.33µs
     ✓ { mode:graphql-jit }.......................: avg=463.15µs min=306.21µs med=407.81µs max=23.08ms  p(90)=486.62µs p(95)=539.32µs
     ✓ { mode:graphql-no-parse-validate-cache }...: avg=987.36µs min=788.23µs med=892.33µs max=29.11ms  p(90)=1ms      p(95)=1.33ms  
     ✓ { mode:graphql-response-cache }............: avg=542.65µs min=360.21µs med=476.02µs max=30.45ms  p(90)=547.18µs p(95)=627.48µs
     ✓ { mode:graphql }...........................: avg=644.76µs min=459.12µs med=553.62µs max=24.29ms  p(90)=664.23µs p(95)=779.43µs
     http_req_failed..............................: 0.00%   ✓ 0           ✗ 129716
     http_req_receiving...........................: avg=35.8µs   min=19.3µs   med=31.1µs   max=10.28ms  p(90)=45.1µs   p(95)=49.7µs  
     http_req_sending.............................: avg=16.72µs  min=7.1µs    med=10.5µs   max=8.33ms   p(90)=16.6µs   p(95)=18.8µs  
     http_req_tls_handshaking.....................: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting.............................: avg=570.87µs min=276.21µs med=454.41µs max=30.36ms  p(90)=853.33µs p(95)=897.23µs
     http_reqs....................................: 129716  1080.940474/s
     iteration_duration...........................: avg=918.19µs min=537.52µs med=788.93µs max=30.81ms  p(90)=1.18ms   p(95)=1.27ms  
     iterations...................................: 129716  1080.940474/s
     vus..........................................: 1       min=1         max=2   
     vus_max......................................: 2       min=2         max=2   

@github-actions
Copy link
Contributor

💻 Website Preview

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

@enisdenjo enisdenjo marked this pull request as ready for review April 12, 2023 16:39
@ardatan ardatan merged commit aff6920 into main Apr 13, 2023
30 of 31 checks passed
@ardatan ardatan deleted the graphql-over-http branch April 13, 2023 09:22
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.

None yet

3 participants