Skip to content

Commit

Permalink
test: add case for overriding existing headers
Browse files Browse the repository at this point in the history
  • Loading branch information
ologbonowiwi committed Mar 12, 2024
1 parent fa83698 commit a784132
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
31 changes: 31 additions & 0 deletions tests/execution/test-response-header-merge.md
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"}]}) {
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"})
}
```
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: "b"}]}) @upstream {
query: Query
}

type Query {
user: User @const(data: {name: "John"})
}

type User {
age: Int
name: String
}

0 comments on commit a784132

Please sign in to comment.