Skip to content

Commit a9f4e7f

Browse files
Removed atlassian specific terms from PR
1 parent b7388e6 commit a9f4e7f

2 files changed

Lines changed: 17 additions & 17 deletions

File tree

test/src/test/kotlin/graphql/nadel/tests/next/fixtures/namespaced/EmptyNamespaceIsEmptyObjectTest.kt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@ import graphql.nadel.NadelExecutionHints
44
import graphql.nadel.tests.next.NadelIntegrationTest
55

66
/**
7-
* Regression test for the HOT/bug where an empty namespace was materialised as `"jira": null`.
7+
* Regression test for the bug where an empty namespace was materialised as `"namespace": null`.
88
*
99
* When every child of a namespaced field is skipped (e.g. `@skip(if: true)`), the namespace has no
10-
* children and no service call is made. It must be materialised as an empty object `"jira": {}`,
11-
* NOT as `"jira": null` (which tripped a downstream Relay non-null handler, turning the whole
10+
* children and no service call is made. It must be materialised as an empty object `"namespace": {}`,
11+
* NOT as `"namespace": null` (which tripped a downstream non-null handler, turning the whole
1212
* response into `data: null`).
1313
*
14-
* Expected result: `{ "hello": "world", "jira": {} }`.
14+
* Expected result: `{ "hello": "world", "namespace": {} }`.
1515
*/
1616
class EmptyNamespaceIsEmptyObjectTest : NadelIntegrationTest(
1717
query = """
1818
query {
1919
hello
20-
jira {
21-
sprint @skip(if: true)
20+
namespace {
21+
foo @skip(if: true)
2222
}
2323
}
2424
""".trimIndent(),
@@ -28,27 +28,27 @@ class EmptyNamespaceIsEmptyObjectTest : NadelIntegrationTest(
2828
overallSchema = """
2929
type Query {
3030
hello: String
31-
jira: JiraQuery @namespaced
31+
namespace: NamespaceQuery @namespaced
3232
}
33-
type JiraQuery {
34-
sprint: String
33+
type NamespaceQuery {
34+
foo: String
3535
}
3636
""".trimIndent(),
3737
underlyingSchema = """
3838
type Query {
3939
hello: String
40-
jira: JiraQuery
40+
namespace: NamespaceQuery
4141
}
42-
type JiraQuery {
43-
sprint: String
42+
type NamespaceQuery {
43+
foo: String
4444
}
4545
""".trimIndent(),
4646
runtimeWiring = { wiring ->
4747
wiring
4848
.type("Query") { type ->
4949
type
5050
.dataFetcher("hello") { "world" }
51-
.dataFetcher("jira") { emptyMap<String, Any?>() }
51+
.dataFetcher("namespace") { emptyMap<String, Any?>() }
5252
}
5353
},
5454
),

test/src/test/kotlin/graphql/nadel/tests/next/fixtures/namespaced/EmptyNamespaceIsEmptyObjectTestSnapshot.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ public class EmptyNamespaceIsEmptyObjectTestSnapshot : TestSnapshot() {
2626
* ```graphql
2727
* query {
2828
* hello
29-
* jira {
30-
* sprint @skip(if: true)
29+
* namespace {
30+
* foo @skip(if: true)
3131
* }
3232
* }
3333
* ```
@@ -64,7 +64,7 @@ public class EmptyNamespaceIsEmptyObjectTestSnapshot : TestSnapshot() {
6464
* {
6565
* "data": {
6666
* "hello": "world",
67-
* "jira": {}
67+
* "namespace": {}
6868
* }
6969
* }
7070
* ```
@@ -74,7 +74,7 @@ public class EmptyNamespaceIsEmptyObjectTestSnapshot : TestSnapshot() {
7474
| {
7575
| "data": {
7676
| "hello": "world",
77-
| "jira": {}
77+
| "namespace": {}
7878
| }
7979
| }
8080
""".trimMargin(),

0 commit comments

Comments
 (0)