-
Notifications
You must be signed in to change notification settings - Fork 196
CODEGEN-759: Update @graphql-codegen/graphql-request peerDep version to 7.0.0 #1106
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
Changes from all commits
cff2a7e
414dce0
013cad5
0a815ec
5f0535f
aa7f2da
37f544b
776569a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@graphql-codegen/typescript-graphql-request': patch | ||
| --- | ||
|
|
||
| Make graphql-request@v7 peerDep |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,7 +38,7 @@ | |
| }, | ||
| "peerDependencies": { | ||
| "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0", | ||
| "graphql-request": "^6.0.0", | ||
| "graphql-request": "^6.0.0 || ^7.0.0", | ||
| "graphql-tag": "^2.0.0" | ||
| }, | ||
| "dependencies": { | ||
|
|
@@ -50,7 +50,8 @@ | |
| "devDependencies": { | ||
| "@graphql-codegen/testing": "1.18.3", | ||
| "@graphql-tools/schema": "10.0.23", | ||
| "graphql-request": "6.0.0" | ||
| "graphql-request": "7.2.0", | ||
| "node-fetch": "2.7.0" | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
So, for tests to work, we need to pass a |
||
| }, | ||
| "publishConfig": { | ||
| "directory": "dist", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,9 @@ | ||
| import { GraphQLClient } from 'graphql-request'; | ||
| import fetch from 'node-fetch'; // FIXME: using `node-fetch` temporarily because `graphql-request@7` uses native fetch, which `[email protected]` from `@graphql-codegen/testing` does not support | ||
| import { getSdk } from './graphql-request-sdk.js'; | ||
|
|
||
| export function runExampleQuery(x: number, y: number) { | ||
| const client = new GraphQLClient('http://localhost:4000/graphql'); | ||
| const client = new GraphQLClient('http://localhost:4000/graphql', { fetch }); | ||
| const sdk = getSdk(client); | ||
| return sdk.Add({ x, y }); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4593,7 +4593,14 @@ graphql-language-service-utils@^2.7.1: | |
| graphql-language-service-types "^1.8.7" | ||
| nullthrows "^1.0.0" | ||
|
|
||
| [email protected], "graphql-request@^4.0.0 || ^5.0.0 || ^6.0.0", graphql-request@^6.0.0: | ||
| [email protected]: | ||
| version "7.2.0" | ||
| resolved "https://registry.yarnpkg.com/graphql-request/-/graphql-request-7.2.0.tgz#af4aa25f27a087dd4fc93a4ff54a0f59c4487269" | ||
| integrity sha512-0GR7eQHBFYz372u9lxS16cOtEekFlZYB2qOyq8wDvzRmdRSJ0mgUVX1tzNcIzk3G+4NY+mGtSz411wZdeDF/+A== | ||
| dependencies: | ||
| "@graphql-typed-document-node/core" "^3.2.0" | ||
|
|
||
| "graphql-request@^4.0.0 || ^5.0.0 || ^6.0.0", graphql-request@^6.0.0: | ||
| version "6.0.0" | ||
| resolved "https://registry.yarnpkg.com/graphql-request/-/graphql-request-6.0.0.tgz#9c8b6a0c341f289e049936d03cc9205300faae1c" | ||
| integrity sha512-2BmHTuglonjZvmNVw6ZzCfFlW/qkIPds0f+Qdi/Lvjsl3whJg2uvHmSvHnLWhUTEw6zcxPYAHiZoPvSVKOZ7Jw== | ||
|
|
@@ -6052,7 +6059,7 @@ [email protected]: | |
| lodash "^4.17.21" | ||
| propagate "^2.0.0" | ||
|
|
||
| node-fetch@^2.5.0, node-fetch@^2.6.1, node-fetch@^2.7.0: | ||
| node-fetch@2.7.0, node-fetch@^2.5.0, node-fetch@^2.6.1, node-fetch@^2.7.0: | ||
| version "2.7.0" | ||
| resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" | ||
| integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is required because we use
[email protected]in dev to run jest, which uses ESM. Jest can only run CJS by default.Since
graphql-requestis ESM, we need to run it throughbabel-jest:transformIgnorePatternsis used to tell Jest to transformgraphql-requestinnode_modules(node_modulesare ignored by default)transformtells Jest to runbabel-jeston.jsfiles ingraphql-requestto turn ESM to CJS