Skip to content

Commit 7a5ebe0

Browse files
renovate[bot]renovate-botdimaMachina
authored
chore(deps): update dependency graphql to v16.3.0 (#933)
* chore(deps): update dependency graphql to v16.3.0 * fix error in `no-unreachable-types` rule on [email protected] Co-authored-by: Renovate Bot <[email protected]> Co-authored-by: Dimitri POSTOLOV <[email protected]>
1 parent 1729313 commit 7a5ebe0

File tree

5 files changed

+15
-8
lines changed

5 files changed

+15
-8
lines changed

.changeset/cool-tools-knock.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@graphql-eslint/eslint-plugin': patch
3+
---
4+
5+
fix error in `no-unreachable-types` rule on [email protected]

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
},
5858
"resolutions": {
5959
"@changesets/git": "1.3.0",
60-
"graphql": "16.2.0"
60+
"graphql": "16.3.0"
6161
},
6262
"lint-staged": {
6363
"{packages,scripts}/**/*.{ts,tsx,js,jsx,cjs,mjs}": [

packages/plugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"@types/graphql-depth-limit": "1.1.3",
5050
"@types/lodash.lowercase": "4.3.6",
5151
"bob-the-bundler": "1.6.1",
52-
"graphql": "16.2.0",
52+
"graphql": "16.3.0",
5353
"typescript": "4.5.5"
5454
},
5555
"peerDependencies": {

packages/plugin/src/graphql-ast.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ export function getReachableTypes(schema: GraphQLSchema): ReachableTypes {
2727
for (const { astNode } of [...objects, ...interfaces]) {
2828
visit(astNode, visitor);
2929
}
30-
} else {
30+
} else if (type.astNode) {
31+
// astNode can be undefined for ID, String, Boolean
3132
visit(type.astNode, visitor);
3233
}
3334
};
@@ -48,7 +49,8 @@ export function getReachableTypes(schema: GraphQLSchema): ReachableTypes {
4849
schema.getMutationType(),
4950
schema.getSubscriptionType(),
5051
]) {
51-
if (type) {
52+
// if schema don't have Query type, schema.astNode will be undefined
53+
if (type?.astNode) {
5254
visit(type.astNode, visitor);
5355
}
5456
}

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4376,10 +4376,10 @@ graphql-ws@^5.4.1:
43764376
resolved "https://registry.yarnpkg.com/graphql-ws/-/graphql-ws-5.5.5.tgz#f375486d3f196e2a2527b503644693ae3a8670a9"
43774377
integrity sha512-hvyIS71vs4Tu/yUYHPvGXsTgo0t3arU820+lT5VjZS2go0ewp2LqyCgxEN56CzOG7Iys52eRhHBiD1gGRdiQtw==
43784378

4379-
[email protected], graphql@16.2.0, graphql@^14.5.3:
4380-
version "16.2.0"
4381-
resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.2.0.tgz#de3150e80f1fc009590b92a9d16ab1b46e12b656"
4382-
integrity sha512-MuQd7XXrdOcmfwuLwC2jNvx0n3rxIuNYOxUtiee5XOmfrWo613ar2U8pE7aHAKh8VwfpifubpD9IP+EdEAEOsA==
4379+
[email protected], graphql@16.3.0, graphql@^14.5.3:
4380+
version "16.3.0"
4381+
resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.3.0.tgz#a91e24d10babf9e60c706919bb182b53ccdffc05"
4382+
integrity sha512-xm+ANmA16BzCT5pLjuXySbQVFwH3oJctUVdy81w1sV0vBU0KgDdBGtxQOUd5zqOBk/JayAFeG8Dlmeq74rjm/A==
43834383

43844384
hard-rejection@^2.1.0:
43854385
version "2.1.0"

0 commit comments

Comments
 (0)