Skip to content

Commit 776569a

Browse files
committed
Use [email protected] in dev to suport graphql15 and 16
1 parent 37f544b commit 776569a

3 files changed

Lines changed: 6 additions & 17 deletions

File tree

packages/plugins/typescript/graphql-request/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"devDependencies": {
5151
"@graphql-codegen/testing": "1.18.3",
5252
"@graphql-tools/schema": "10.0.23",
53-
"graphql-request": "7.1.2",
53+
"graphql-request": "7.2.0",
5454
"node-fetch": "2.7.0"
5555
},
5656
"publishConfig": {

packages/plugins/typescript/graphql-request/tests/integration.spec.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { join } from 'path';
22
import { remove, writeFile } from 'fs-extra';
3-
// @ts-ignore
4-
import { OperationTypeNode, parse } from 'graphql';
3+
import { parse } from 'graphql';
54
import { codegen } from '@graphql-codegen/core';
65
import { mockGraphQLServer } from '@graphql-codegen/testing';
76
import * as TypeScriptPlugin from '@graphql-codegen/typescript';
@@ -11,16 +10,6 @@ import * as GraphQLRequestPlugin from '../src/index.js';
1110

1211
describe('GraphQL Request Integration', () => {
1312
it('should send requests correctly', async () => {
14-
// @ts-ignore
15-
if (!OperationTypeNode) {
16-
// `OperationTypeNode` is a type in `graphql@15`, but it is a native TS enum in `graphql@16`.
17-
// `graphql-request@7` uses `OperationTypeNode` enum to analyse document.
18-
// So, `graphql-request@7` does not work with `graphql@15`.
19-
//
20-
// This block is a hacky way to skip running this test for `graphql@15`.
21-
return;
22-
}
23-
2413
const sdkFileName = 'graphql-request-sdk.ts';
2514
const sdkFilePath = join(__dirname, './test-files', sdkFileName);
2615
const typeDefs = parse(/* GraphQL */ `

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4593,10 +4593,10 @@ graphql-language-service-utils@^2.7.1:
45934593
graphql-language-service-types "^1.8.7"
45944594
nullthrows "^1.0.0"
45954595

4596-
graphql-request@7.1.2:
4597-
version "7.1.2"
4598-
resolved "https://registry.yarnpkg.com/graphql-request/-/graphql-request-7.1.2.tgz#52d7fd6d8d08c9f0b00c84a091376ce9fbdfa945"
4599-
integrity sha512-+XE3iuC55C2di5ZUrB4pjgwe+nIQBuXVIK9J98wrVwojzDW3GMdSBZfxUk8l4j9TieIpjpggclxhNEU9ebGF8w==
4596+
graphql-request@7.2.0:
4597+
version "7.2.0"
4598+
resolved "https://registry.yarnpkg.com/graphql-request/-/graphql-request-7.2.0.tgz#af4aa25f27a087dd4fc93a4ff54a0f59c4487269"
4599+
integrity sha512-0GR7eQHBFYz372u9lxS16cOtEekFlZYB2qOyq8wDvzRmdRSJ0mgUVX1tzNcIzk3G+4NY+mGtSz411wZdeDF/+A==
46004600
dependencies:
46014601
"@graphql-typed-document-node/core" "^3.2.0"
46024602

0 commit comments

Comments
 (0)