-
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.
refactor(config): remove explicit interface flag (#1872)
- Loading branch information
Showing
9 changed files
with
121 additions
and
25 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
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
32 changes: 32 additions & 0 deletions
32
tests/core/snapshots/test-interface-from-json.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,32 @@ | ||
--- | ||
source: tests/core/spec.rs | ||
expression: client | ||
--- | ||
type B implements IA { | ||
a: String | ||
b: String | ||
} | ||
|
||
scalar Date | ||
|
||
scalar Email | ||
|
||
scalar Empty | ||
|
||
interface IA { | ||
a: String | ||
} | ||
|
||
scalar JSON | ||
|
||
scalar PhoneNumber | ||
|
||
type Query { | ||
bar: B | ||
} | ||
|
||
scalar Url | ||
|
||
schema { | ||
query: Query | ||
} |
20 changes: 20 additions & 0 deletions
20
tests/core/snapshots/test-interface-from-json.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,20 @@ | ||
--- | ||
source: tests/core/spec.rs | ||
expression: merged | ||
--- | ||
schema @server @upstream(baseURL: "http://jsonplaceholder.typicode.com") { | ||
query: Query | ||
} | ||
|
||
interface IA { | ||
a: String | ||
} | ||
|
||
type B implements IA { | ||
a: String | ||
b: String | ||
} | ||
|
||
type Query { | ||
bar: B @http(path: "/posts") | ||
} |
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,42 @@ | ||
# Interfaces defined in json | ||
|
||
```json @server | ||
{ | ||
"upstream": { | ||
"baseURL": "http://jsonplaceholder.typicode.com" | ||
}, | ||
"schema": { | ||
"query": "Query" | ||
}, | ||
"types": { | ||
"IA": { | ||
"fields": { | ||
"a": { | ||
"type": "String" | ||
} | ||
} | ||
}, | ||
"B": { | ||
"implements": ["IA"], | ||
"fields": { | ||
"a": { | ||
"type": "String" | ||
}, | ||
"b": { | ||
"type": "String" | ||
} | ||
} | ||
}, | ||
"Query": { | ||
"fields": { | ||
"bar": { | ||
"type": "B", | ||
"http": { | ||
"path": "/posts" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
``` |
4c4b5ba
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Running 30s test @ http://localhost:8000/graphql
4 threads and 100 connections
359221 requests in 30.01s, 1.80GB read
Requests/sec: 11969.53
Transfer/sec: 61.44MB