diff --git a/example/social/introspect.json b/example/social/introspect.json index df8401458..f9ceead3b 100644 --- a/example/social/introspect.json +++ b/example/social/introspect.json @@ -8,9 +8,13 @@ "description": "Explains why this element was deprecated, usually also including a suggestion\nfor how to access supported similar data. Formatted in\n[Markdown](https://daringfireball.net/projects/markdown/).", "name": "reason", "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } } } ], diff --git a/example/starwars/introspect.json b/example/starwars/introspect.json index 1279f9f88..b2352a174 100644 --- a/example/starwars/introspect.json +++ b/example/starwars/introspect.json @@ -8,9 +8,13 @@ "description": "Explains why this element was deprecated, usually also including a suggestion\nfor how to access supported similar data. Formatted in\n[Markdown](https://daringfireball.net/projects/markdown/).", "name": "reason", "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } } } ], diff --git a/graphql_test.go b/graphql_test.go index 29dc2cfc5..6653be618 100644 --- a/graphql_test.go +++ b/graphql_test.go @@ -2567,8 +2567,11 @@ func TestIntrospection(t *testing.T) { "name": "reason", "description": "Explains why this element was deprecated, usually also including a suggestion\nfor how to access supported similar data. Formatted in\n[Markdown](https://daringfireball.net/projects/markdown/).", "type": { - "kind": "SCALAR", - "ofType": null + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } } } ] diff --git a/internal/schema/meta.go b/internal/schema/meta.go index 3467e9541..60a6234fb 100644 --- a/internal/schema/meta.go +++ b/internal/schema/meta.go @@ -55,7 +55,7 @@ var metaSrc = ` # Explains why this element was deprecated, usually also including a suggestion # for how to access supported similar data. Formatted in # [Markdown](https://daringfireball.net/projects/markdown/). - reason: String = "No longer supported" + reason: String! = "No longer supported" ) on FIELD_DEFINITION | ENUM_VALUE | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Provides a scalar specification URL for specifying the behavior of custom scalar types.