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(url-loader): bump cross-undici-fetch to the latest for pinned undici@5.5.1 #4559

Merged
merged 1 commit into from Jul 4, 2022

Conversation

ardatan
Copy link
Owner

@ardatan ardatan commented Jul 4, 2022

Related to ardatan/whatwg-node#52 & dotansimha/graphql-code-generator#8012

undici@5.6.0 has a regression in its fetch implementation. When you use it like the following which is valid per Fetch API spec, it throws an error that says you cannot have body with GET/HEAD HTTP requests.
See nodejs/undici#1527
It basically ignores the HTTP method given in Request object created by undici.

const request = new Request(someUrl, {
  method: 'POST',
  body: 'SOME_CONTENT'
});
const response = fetch(request);

Since cross-undici-fetch uses undici's fetch for Node 16 and above, this is breaking for the users of url-loader that is dependency of GraphQL Code Generator, GraphQL Config and others.

cross-undici-fetch in the latest version has undici@5.5.1 as a pinned dependency that doesn't have the issue mentioned above.
And this PR updates the version range of cross-undici-fetch for @graphql-tools/url-loader so the regression will be fixed.

In the meanwhile, we will create an issue and a PR Undici's repo that reproduces the issue with details.

@changeset-bot
Copy link

changeset-bot bot commented Jul 4, 2022

🦋 Changeset detected

Latest commit: c2a67ae

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

This PR includes changesets to release 4 packages
Name Type
@graphql-tools/apollo-engine-loader Patch
@graphql-tools/github-loader Patch
@graphql-tools/url-loader Patch
@graphql-tools/prisma-loader 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

@vercel
Copy link

vercel bot commented Jul 4, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
graphql-tools ❌ Failed (Inspect) Jul 4, 2022 at 9:50AM (UTC)

@theguild-bot
Copy link
Collaborator

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

@graphql-tools/apollo-engine-loader@7.3.1-alpha-baf6e83c.0
@graphql-tools/github-loader@7.3.1-alpha-baf6e83c.0
@graphql-tools/prisma-loader@7.2.2-alpha-baf6e83c.0
@graphql-tools/url-loader@7.12.1-alpha-baf6e83c.0

@github-actions
Copy link
Contributor

github-actions bot commented Jul 4, 2022

✅ Benchmark Results

     ✓ no_errors
     ✓ expected_result

     checks.........................: 100.00% ✓ 260       ✗ 0  
     data_received..................: 30 MB   3.0 MB/s
     data_sent......................: 111 kB  11 kB/s
     http_req_blocked...............: avg=4.92µs   min=2.7µs   med=3.5µs   max=178.69µs p(90)=4.4µs    p(95)=4.7µs   
     http_req_connecting............: avg=928ns    min=0s      med=0s      max=120.69µs p(90)=0s       p(95)=0s      
   ✓ http_req_duration..............: avg=72.01ms  min=61.79ms med=68.63ms max=168.78ms p(90)=77.91ms  p(95)=98.34ms 
       { expected_response:true }...: avg=72.01ms  min=61.79ms med=68.63ms max=168.78ms p(90)=77.91ms  p(95)=98.34ms 
     http_req_failed................: 0.00%   ✓ 0         ✗ 130
     http_req_receiving.............: avg=142.22µs min=119.3µs med=135.1µs max=645.29µs p(90)=150.74µs p(95)=158.09µs
     http_req_sending...............: avg=87.31µs  min=16.7µs  med=24.8µs  max=1.94ms   p(90)=28.66µs  p(95)=609.1µs 
     http_req_tls_handshaking.......: avg=0s       min=0s      med=0s      max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=71.78ms  min=61.63ms med=68.47ms max=168.08ms p(90)=77.03ms  p(95)=98.17ms 
     http_reqs......................: 130     12.902839/s
     iteration_duration.............: avg=77.47ms  min=66.34ms med=73.79ms max=173.55ms p(90)=86.91ms  p(95)=107.97ms
     iterations.....................: 130     12.902839/s
     vus............................: 1       min=1       max=1
     vus_max........................: 1       min=1       max=1

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

2 participants