-
Notifications
You must be signed in to change notification settings - Fork 259
refactor: move server responseHeaders to server headers custom #1402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
tusharmath
merged 23 commits into
tailcallhq:main
from
wesleymatosdev:refactor/#1400/move-server-responseHeaders-to-server-headers-custom
Mar 13, 2024
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
e2ac994
feat: use `headers.custom` to hold response headers
wesleymatosdev c30c3f4
test: update `responseHeaders` cases to use `headers.custom` instead
wesleymatosdev 012f104
docs: update docs via `./lint.sh --mode=fix`
wesleymatosdev 0a9ebe8
test: add case for overriding existing headers
wesleymatosdev fbe15a5
feat: use `headers.custom` to hold response headers
wesleymatosdev ea7ffde
test: update `responseHeaders` cases to use `headers.custom` instead
wesleymatosdev fa83698
docs: update docs via `./lint.sh --mode=fix`
wesleymatosdev a784132
test: add case for overriding existing headers
wesleymatosdev 5e0ae9c
Merge branch 'main' into refactor/#1400/move-server-responseHeaders-t…
tusharmath 542ce18
Merge branch 'main' into refactor/#1400/move-server-responseHeaders-t…
tusharmath c7edd11
refactor(`key_values.rs`): move key_value merge right from `server.rs`
wesleymatosdev 79df0ee
refactor(`headers.rs`): move headers merging from `server.rs`
wesleymatosdev 9307219
feat: allow duplicated headers
wesleymatosdev 44c90ec
test: update snapshot
wesleymatosdev 6e99489
Merge branch 'refactor/#1400/move-server-responseHeaders-to-server-he…
wesleymatosdev 4481d78
refactor: remove unused method
wesleymatosdev 108ddf2
style: run `./lint.sh --mode=fix`
wesleymatosdev bb1acd5
style: run `./lint.sh --mode=fix`
wesleymatosdev 367aa92
refactor(`key_values.rs`): reduce complexity from O(n^2) to O(n)
wesleymatosdev 7ac04fe
Merge branch 'main' of github.com:tailcallhq/tailcall into refactor/#…
wesleymatosdev 2ece27b
fix: implement map usage correctly
wesleymatosdev 4418df9
refactor: remove unused test submodule
wesleymatosdev 2478fe9
refactor: avoid overusage of memory
wesleymatosdev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,31 @@ | ||
# test-response-header-value | ||
|
||
```graphql @server | ||
schema @server(headers: {custom: [{key: "a", value: "a"}]}) { | ||
tusharmath marked this conversation as resolved.
Show resolved
Hide resolved
|
||
query: Query | ||
} | ||
|
||
type User { | ||
name: String | ||
age: Int | ||
} | ||
|
||
type Query { | ||
user: User @const(data: {name: "John"}) | ||
} | ||
``` | ||
|
||
```graphql @server | ||
schema @server(headers: {custom: [{key: "a", value: "b"}]}) { | ||
query: Query | ||
} | ||
|
||
type User { | ||
name: String | ||
age: Int | ||
} | ||
|
||
type Query { | ||
user: User @const(data: {name: "John"}) | ||
} | ||
``` |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
16 changes: 16 additions & 0 deletions
16
tests/snapshots/execution_spec__test-response-header-merge.md_merged.snap
This file contains hidden or 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(headers: {custom: [{key: "a", value: "a"}, {key: "a", value: "b"}]}) @upstream { | ||
query: Query | ||
} | ||
|
||
type Query { | ||
user: User @const(data: {name: "John"}) | ||
} | ||
|
||
type User { | ||
age: Int | ||
name: String | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.