-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- added test case for list edge case.
- Loading branch information
1 parent
bbd1031
commit d691ada
Showing
3 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
...ailcall__core__config__transformer__type_merger__type_merger__test__list_field_types.snap
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,28 @@ | ||
--- | ||
source: src/core/config/transformer/type_merger/type_merger.rs | ||
expression: config.to_sdl() | ||
--- | ||
schema @server(hostname: "0.0.0.0", port: 8000) @upstream(baseURL: "http://jsonplaceholder.typicode.com", httpCache: 42) { | ||
query: Query | ||
} | ||
|
||
type F2 { | ||
user: [User] | ||
} | ||
|
||
type F3 { | ||
user: User | ||
} | ||
|
||
type Query { | ||
user(id: Int!): F3 @http(path: "/users/{{.args.id}}") | ||
users: F2 @http(path: "/users") | ||
} | ||
|
||
type User { | ||
email: String! | ||
id: Int! | ||
name: String! | ||
phone: String | ||
username: String! | ||
} |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
schema | ||
@server(port: 8000, hostname: "0.0.0.0") | ||
@upstream(baseURL: "http://jsonplaceholder.typicode.com", httpCache: 42) { | ||
query: Query | ||
} | ||
|
||
type F2 { | ||
user: [User] | ||
} | ||
|
||
type F3 { | ||
user: User | ||
} | ||
|
||
type User { | ||
id: Int! | ||
name: String! | ||
username: String! | ||
email: String! | ||
phone: String | ||
} | ||
|
||
type Query { | ||
users: F2 @http(path: "/users") | ||
user(id: Int!): F3 @http(path: "/users/{{.args.id}}") | ||
} |