-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add 2 JS snapshot tests to SkipRedundantNodesTransform
Reviewed By: jstejada Differential Revision: D20285547 fbshipit-source-id: 8d1e52432c9407691812376aa781455bc4a92741
- Loading branch information
1 parent
24180d7
commit 9883c81
Showing
3 changed files
with
117 additions
and
0 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
15 changes: 15 additions & 0 deletions
15
...__/fixtures/skip-redundant-nodes-transform/dont-skip-with-inline-on-diffent-types.graphql
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,15 @@ | ||
query DontSkipWithInlineFragmentOnDifferentTypes { | ||
viewer { | ||
actor { | ||
... on Actor { | ||
id | ||
} | ||
... on User { | ||
id # we currently don't skip this | ||
hometown { | ||
name | ||
} | ||
} | ||
} | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
...ms/__tests__/fixtures/skip-redundant-nodes-transform/skips-with-client-extensions.graphql
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,23 @@ | ||
query SkipWithClientExtensions { | ||
viewer { | ||
actor { | ||
... on Actor { | ||
clientName | ||
clientUser { | ||
name | ||
} | ||
clientName | ||
clientUser { | ||
... on User { | ||
name | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
extend interface Actor { | ||
clientName: String | ||
clientUser: User | ||
} |