-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
03f9829
commit 7f7edbe
Showing
11 changed files
with
207 additions
and
5 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Empty Array Response | ||
|
||
```graphql @server | ||
schema @server { | ||
query: Query | ||
} | ||
|
||
type Query { | ||
hi(id: ID!): [Company] @http(baseURL: "http://localhost:3000", path: "/hi") | ||
} | ||
type Company { | ||
name: String | ||
id: ID | ||
} | ||
``` | ||
|
||
```yml @mock | ||
- request: | ||
method: GET | ||
url: http://localhost:3000/hi | ||
response: | ||
status: 200 | ||
``` | ||
|
||
```yml @test | ||
- method: POST | ||
url: http://localhost:8080/graphql | ||
body: | ||
query: "query { hi (id: 1) { name id } }" | ||
``` |
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,30 @@ | ||
# Empty Object Response | ||
|
||
```graphql @server | ||
schema @server { | ||
query: Query | ||
} | ||
|
||
type Query { | ||
hi(id: ID!): Company @http(baseURL: "http://localhost:3000", path: "/hi") | ||
} | ||
type Company { | ||
name: String | ||
id: ID | ||
} | ||
``` | ||
|
||
```yml @mock | ||
- request: | ||
method: GET | ||
url: http://localhost:3000/hi | ||
response: | ||
status: 200 | ||
``` | ||
|
||
```yml @test | ||
- method: POST | ||
url: http://localhost:8080/graphql | ||
body: | ||
query: "query { hi (id: 1) { name id } }" | ||
``` |
28 changes: 28 additions & 0 deletions
28
tests/snapshots/execution_spec__test-null-in-array.md_client.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: tests/execution_spec.rs | ||
expression: client | ||
--- | ||
type Company { | ||
id: ID | ||
name: String | ||
} | ||
|
||
scalar Date | ||
|
||
scalar Email | ||
|
||
scalar Empty | ||
|
||
scalar JSON | ||
|
||
scalar PhoneNumber | ||
|
||
type Query { | ||
hi(id: ID!): [Company] | ||
} | ||
|
||
scalar Url | ||
|
||
schema { | ||
query: Query | ||
} |
16 changes: 16 additions & 0 deletions
16
tests/snapshots/execution_spec__test-null-in-array.md_merged.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,16 @@ | ||
--- | ||
source: tests/execution_spec.rs | ||
expression: merged | ||
--- | ||
schema @server @upstream { | ||
query: Query | ||
} | ||
|
||
type Company { | ||
id: ID | ||
name: String | ||
} | ||
|
||
type Query { | ||
hi(id: ID!): [Company] @http(baseURL: "http://localhost:3000", path: "/hi") | ||
} |
15 changes: 15 additions & 0 deletions
15
tests/snapshots/execution_spec__test-null-in-array.md_test_0.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,15 @@ | ||
--- | ||
source: tests/execution_spec.rs | ||
expression: response | ||
--- | ||
{ | ||
"status": 200, | ||
"headers": { | ||
"content-type": "application/json" | ||
}, | ||
"body": { | ||
"data": { | ||
"hi": null | ||
} | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
tests/snapshots/execution_spec__test-null-in-object.md_client.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: tests/execution_spec.rs | ||
expression: client | ||
--- | ||
type Company { | ||
id: ID | ||
name: String | ||
} | ||
|
||
scalar Date | ||
|
||
scalar Email | ||
|
||
scalar Empty | ||
|
||
scalar JSON | ||
|
||
scalar PhoneNumber | ||
|
||
type Query { | ||
hi(id: ID!): Company | ||
} | ||
|
||
scalar Url | ||
|
||
schema { | ||
query: Query | ||
} |
16 changes: 16 additions & 0 deletions
16
tests/snapshots/execution_spec__test-null-in-object.md_merged.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,16 @@ | ||
--- | ||
source: tests/execution_spec.rs | ||
expression: merged | ||
--- | ||
schema @server @upstream { | ||
query: Query | ||
} | ||
|
||
type Company { | ||
id: ID | ||
name: String | ||
} | ||
|
||
type Query { | ||
hi(id: ID!): Company @http(baseURL: "http://localhost:3000", path: "/hi") | ||
} |
18 changes: 18 additions & 0 deletions
18
tests/snapshots/execution_spec__test-null-in-object.md_test_0.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,18 @@ | ||
--- | ||
source: tests/execution_spec.rs | ||
expression: response | ||
--- | ||
{ | ||
"status": 200, | ||
"headers": { | ||
"content-type": "application/json" | ||
}, | ||
"body": { | ||
"data": { | ||
"hi": { | ||
"name": null, | ||
"id": null | ||
} | ||
} | ||
} | ||
} |