Skip to content

Commit 2d8277b

Browse files
committed
Non-null shouldn't be stripped by semantic
1 parent f5dfa8c commit 2d8277b

6 files changed

+6
-6
lines changed

__tests__/schema-with-directive-only.test.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ type Book implements Thing {
2727
id: ID!
2828
name: String @semanticNonNull
2929
description: String
30-
# Test that this non-null gets stripped
30+
# Test that this non-null is retained
3131
pages: Int! @semanticNonNull
3232
}
3333

__tests__/schema-with-directive.test.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ type Book implements Thing {
2828
# Test that this semantic-non-null doesn't cause issues
2929
name: String* @semanticNonNull
3030
description: String
31-
# Test that this non-null gets stripped
31+
# Test that this non-null is retained
3232
pages: Int! @semanticNonNull
3333
}
3434

__tests__/schema.test.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type Book implements Thing {
2424
id: ID!
2525
name: String*
2626
description: String
27-
pages: Int*
27+
pages: Int!
2828
}
2929

3030
type Car implements Thing {

__tests__/snapshots/schema-with-directive-only.nullable.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type Book implements Thing {
2424
id: ID!
2525
name: String
2626
description: String
27-
pages: Int
27+
pages: Int!
2828
}
2929

3030
type Car implements Thing {

__tests__/snapshots/schema-with-directive.nullable.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type Book implements Thing {
2424
id: ID!
2525
name: String
2626
description: String
27-
pages: Int
27+
pages: Int!
2828
}
2929

3030
type Car implements Thing {

__tests__/snapshots/schema.nullable.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type Book implements Thing {
2424
id: ID!
2525
name: String
2626
description: String
27-
pages: Int
27+
pages: Int!
2828
}
2929

3030
type Car implements Thing {

0 commit comments

Comments
 (0)