-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: handle plural singular type name as one. (#2178)
Co-authored-by: Ranjit Mahadik <43403528+ranjitmahadik@users.noreply.github.com>
- Loading branch information
1 parent
c4dfd8b
commit 3d91f58
Showing
3 changed files
with
65 additions
and
4 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
.../tailcall__core__config__transformer__type_name_generator__test__type_name_generator.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,26 @@ | ||
--- | ||
source: src/core/config/transformer/type_name_generator.rs | ||
expression: transformed_config.to_sdl() | ||
--- | ||
schema @server(hostname: "0.0.0.0", port: 8000) @upstream(baseURL: "http://example.typicode.com", httpCache: 42) { | ||
query: Query | ||
} | ||
|
||
type Color { | ||
colors: [T3] | ||
isColorPageExists: Boolean | ||
isColorsImageAvailable: Boolean | ||
} | ||
|
||
type F1 { | ||
color: Color | ||
} | ||
|
||
type Query { | ||
f1: F1 @http(path: "/colors") | ||
} | ||
|
||
type T3 { | ||
hexCode: String | ||
name: 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
21 changes: 21 additions & 0 deletions
21
tailcall-fixtures/fixtures/configs/name-generation.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,21 @@ | ||
schema @server(port: 8000, hostname: "0.0.0.0") @upstream(baseURL: "http://example.typicode.com", httpCache: 42) { | ||
query: Query | ||
} | ||
type T3 { | ||
name: String | ||
hexCode: String | ||
} | ||
|
||
type T2 { | ||
colors: [T3] | ||
isColorPageExists: Boolean | ||
isColorsImageAvailable: Boolean | ||
} | ||
|
||
type T1 { | ||
color: T2 | ||
} | ||
|
||
type Query { | ||
f1: T1 @http(path: "/colors") | ||
} |
3d91f58
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
452541 requests in 30.10s, 2.27GB read
Requests/sec: 15034.52
Transfer/sec: 77.17MB