-
Notifications
You must be signed in to change notification settings - Fork 272
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
this fixes an incorrect unused field validation when using `rest: *`: ``` No connector resolves field `User.rest`. It must have a `@connect` directive or appear in `@connect(selection:)`. ```
- Loading branch information
1 parent
408ac64
commit 309ad5f
Showing
3 changed files
with
154 additions
and
99 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
6 changes: 6 additions & 0 deletions
6
...deration/src/sources/connect/validation/snapshots/[email protected]
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,6 @@ | ||
--- | ||
source: apollo-federation/src/sources/connect/validation/mod.rs | ||
expression: "format!(\"{:#?}\", errors)" | ||
input_file: apollo-federation/src/sources/connect/validation/test_data/rest-good.graphql | ||
--- | ||
[] |
18 changes: 18 additions & 0 deletions
18
apollo-federation/src/sources/connect/validation/test_data/rest-good.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,18 @@ | ||
extend schema | ||
@link( | ||
url: "https://specs.apollo.dev/connect/v0.1" | ||
import: ["@connect", "@source"] | ||
) | ||
@source(name: "v2", http: { baseURL: "http://127.0.0.1" }) | ||
|
||
type Query { | ||
good: [Good!]! | ||
@connect(source: "v2", http: { GET: "/" }, selection: "id rest: *") | ||
} | ||
|
||
type Good { | ||
id: ID! | ||
rest: JSON | ||
} | ||
|
||
scalar JSON |