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

fix: multipart response specification compatibility #3400

Merged
merged 5 commits into from
Aug 3, 2024

Conversation

n1ru4l
Copy link
Collaborator

@n1ru4l n1ru4l commented Aug 3, 2024

Closes #3399

Restores compatibility with RFC1341: The Multipart Content-Type by include preceding \r\n for initial boundary delimiter when using the multipart response protocol.

This makes Yoga compatible with libraries that strictly follow the response protocol, such as fetch-multipart-graphql.

Copy link

changeset-bot bot commented Aug 3, 2024

🦋 Changeset detected

Latest commit: 5e8c11f

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

This PR includes changesets to release 23 packages
Name Type
graphql-yoga Patch
@graphql-yoga/nestjs Patch
@graphql-yoga/render-graphiql Patch
@graphql-yoga/plugin-apollo-inline-trace Patch
@graphql-yoga/apollo-managed-federation Patch
@graphql-yoga/plugin-apq Patch
@graphql-yoga/plugin-csrf-prevention Patch
@graphql-yoga/plugin-defer-stream Patch
@graphql-yoga/plugin-disable-introspection Patch
@graphql-yoga/plugin-graphql-sse Patch
@graphql-yoga/plugin-jwt Patch
@graphql-yoga/plugin-persisted-operations Patch
@graphql-yoga/plugin-prometheus Patch
@graphql-yoga/plugin-response-cache Patch
@graphql-yoga/plugin-sofa Patch
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 Aug 3, 2024

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 Aug 3, 2024

✅ 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% ✓ 417096      ✗ 0     
     data_received................................: 1.7 GB  14 MB/s
     data_sent....................................: 84 MB   702 kB/s
     http_req_blocked.............................: avg=1.47µs   min=1.03µs   med=1.33µs   max=309.62µs p(90)=1.93µs   p(95)=2.12µs  
     http_req_connecting..........................: avg=2ns      min=0s       med=0s       max=125.34µs p(90)=0s       p(95)=0s      
     http_req_duration............................: avg=362.51µs min=219.03µs med=322.59µs max=18.33ms  p(90)=475.08µs p(95)=502.88µs
       { expected_response:true }.................: avg=362.51µs min=219.03µs med=322.59µs max=18.33ms  p(90)=475.08µs p(95)=502.88µs
     ✓ { mode:graphql-jit }.......................: avg=283.03µs min=219.03µs med=261.91µs max=18.33ms  p(90)=291.33µs p(95)=302.15µs
     ✓ { mode:graphql-no-parse-validate-cache }...: avg=503.95µs min=404.02µs med=472.29µs max=10.85ms  p(90)=534.32µs p(95)=577.52µs
     ✓ { mode:graphql-response-cache }............: avg=345.39µs min=273.04µs med=326.29µs max=6.94ms   p(90)=355.94µs p(95)=366.26µs
     ✓ { mode:graphql }...........................: avg=361.09µs min=271.96µs med=327.71µs max=13.61ms  p(90)=376.54µs p(95)=417.4µs 
     http_req_failed..............................: 0.00%   ✓ 0           ✗ 208548
     http_req_receiving...........................: avg=33.55µs  min=17.21µs  med=33.3µs   max=3.38ms   p(90)=39.05µs  p(95)=40.97µs 
     http_req_sending.............................: avg=8µs      min=5.87µs   med=7.08µs   max=371.53µs p(90)=10.62µs  p(95)=11.42µs 
     http_req_tls_handshaking.....................: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting.............................: avg=320.95µs min=181.18µs med=281.31µs max=18.23ms  p(90)=432.58µs p(95)=458.59µs
     http_reqs....................................: 208548  1737.875002/s
     iteration_duration...........................: avg=570.67µs min=387.1µs  med=527.38µs max=18.83ms  p(90)=691.22µs p(95)=724.03µs
     iterations...................................: 208548  1737.875002/s
     vus..........................................: 1       min=1         max=1   
     vus_max......................................: 2       min=2         max=2   

Copy link
Contributor

github-actions bot commented Aug 3, 2024

💻 Website Preview

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

@n1ru4l n1ru4l changed the title chore: add integration test for fetch-multipart-graphql fix: multipart response specification compatability Aug 3, 2024
@n1ru4l n1ru4l changed the title fix: multipart response specification compatability fix: multipart response specification compatibility Aug 3, 2024
@n1ru4l n1ru4l merged commit 0866c1b into main Aug 3, 2024
34 checks passed
@n1ru4l n1ru4l deleted the integration-test-fetch-multipart-graphql branch August 3, 2024 16:49
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.

multipart stream is missing CRLF at beginning of first chunk
2 participants