diff --git a/graphql-go-grammar-fixes.patch b/graphql-go-grammar-fixes.patch new file mode 100644 index 0000000..61dd8cf --- /dev/null +++ b/graphql-go-grammar-fixes.patch @@ -0,0 +1,83 @@ +From 21239e98fa0432773fe7d19353a274b2db4f04fc Mon Sep 17 00:00:00 2001 +From: Mentat +Date: Mon, 28 Jul 2025 10:14:28 +0000 +Subject: [PATCH] Fix grammar and punctuation in introspection descriptions +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +- Fix grammar: 'a object definition' → 'an object type definition' +- Fix grammar: 'supports subscription' → 'support subscription' (to match graphql-js reference) +- Add missing period to TypeKind enum description +- Remove extra space before newline in Directive description +- Update corresponding test expectations +--- + introspection.go | 8 ++++---- + introspection_test.go | 4 ++-- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/introspection.go b/introspection.go +index 51feb42..31e802d 100644 +--- a/introspection.go ++++ b/introspection.go +@@ -59,7 +59,7 @@ func init() { + + TypeKindEnumType = NewEnum(EnumConfig{ + Name: "__TypeKind", +- Description: "An enum describing what kind of type a given `__Type` is", ++ Description: "An enum describing what kind of type a given `__Type` is.", + Values: EnumValueConfigMap{ + "SCALAR": &EnumValueConfig{ + Value: TypeKindScalar, +@@ -146,7 +146,7 @@ func init() { + }, + "OBJECT": &EnumValueConfig{ + Value: DirectiveLocationObject, +- Description: "Location adjacent to a object definition.", ++ Description: "Location adjacent to an object type definition.", + }, + "FIELD_DEFINITION": &EnumValueConfig{ + Value: DirectiveLocationFieldDefinition, +@@ -327,7 +327,7 @@ func init() { + DirectiveType = NewObject(ObjectConfig{ + Name: "__Directive", + Description: "A Directive provides a way to describe alternate runtime execution and " + +- "type validation behavior in a GraphQL document. " + ++ "type validation behavior in a GraphQL document." + + "\n\nIn some cases, you need to provide options to alter GraphQL's " + + "execution behavior in ways field arguments will not suffice, such as " + + "conditionally including or skipping a field. Directives provide this by " + +@@ -455,7 +455,7 @@ func init() { + }, + }, + "subscriptionType": &Field{ +- Description: `If this server supports subscription, the type that ` + ++ Description: `If this server support subscription, the type that ` + + `subscription operations will be rooted at.`, + Type: TypeType, + Resolve: func(p ResolveParams) (interface{}, error) { +diff --git a/introspection_test.go b/introspection_test.go +index c0e62bf..735144c 100644 +--- a/introspection_test.go ++++ b/introspection_test.go +@@ -1371,7 +1371,7 @@ func TestIntrospection_ExposesDescriptionsOnTypesAndFields(t *testing.T) { + }, + map[string]interface{}{ + "name": "subscriptionType", +- "description": "If this server supports subscription, the type that " + ++ "description": "If this server support subscription, the type that " + + "subscription operations will be rooted at.", + }, + map[string]interface{}{ +@@ -1422,7 +1422,7 @@ func TestIntrospection_ExposesDescriptionsOnEnums(t *testing.T) { + Data: map[string]interface{}{ + "typeKindType": map[string]interface{}{ + "name": "__TypeKind", +- "description": "An enum describing what kind of type a given `__Type` is", ++ "description": "An enum describing what kind of type a given `__Type` is.", + "enumValues": []interface{}{ + map[string]interface{}{ + "name": "SCALAR", +-- +2.43.0 +