Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions graphql-go-grammar-fixes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
From 21239e98fa0432773fe7d19353a274b2db4f04fc Mon Sep 17 00:00:00 2001
From: Mentat <[email protected]>
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