Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test for
known-fragment-names
rule with import nested fragments…
… + update `graphql-tools/import` package (#665) * add failing test false positive case for `known-fragment-names` rule * chore: update deps
- Loading branch information
Dimitri POSTOLOV
committed
Nov 12, 2021
1 parent
70136fd
commit 1914d6a
Showing
12 changed files
with
379 additions
and
327 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@graphql-eslint/eslint-plugin': minor | ||
--- | ||
|
||
fix false positive case in `known-fragment-names` when import nested fragment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,6 @@ | |
}, | ||
"devDependencies": { | ||
"@graphql-eslint/eslint-plugin": "2.4.1", | ||
"eslint": "8.1.0" | ||
"eslint": "8.2.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,6 @@ | |
}, | ||
"devDependencies": { | ||
"@graphql-eslint/eslint-plugin": "2.4.1", | ||
"eslint": "8.1.0" | ||
"eslint": "8.2.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,6 @@ | |
}, | ||
"devDependencies": { | ||
"@graphql-eslint/eslint-plugin": "2.4.1", | ||
"eslint": "8.1.0" | ||
"eslint": "8.2.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
packages/plugin/tests/mocks/user-fields-with-nested-fragment.gql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
fragment UserFields on User { | ||
...AnotherUserFields | ||
posts { | ||
...PostFields | ||
} | ||
} | ||
|
||
fragment AnotherUserFields on User { | ||
firstName | ||
} | ||
|
||
fragment PostFields on Post { | ||
id | ||
...AnotherPostFields | ||
} | ||
|
||
fragment AnotherPostFields on Post { | ||
title | ||
...YetAnotherPostFields | ||
} | ||
|
||
fragment YetAnotherPostFields on Post { | ||
content | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#import "./user-fields.graphql" | ||
#import './user-fields-with-nested-fragment.gql' | ||
|
||
query User { | ||
user { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.