Skip to content

Conversation

@egoodwinx
Copy link

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 8, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: egoodwinx / name: Emily Goodwin (8275f38)

@netlify
Copy link

netlify bot commented Oct 8, 2025

Deploy Preview for graphql-spec-draft ready!

Name Link
🔨 Latest commit 8275f38
🔍 Latest deploy log https://app.netlify.com/projects/graphql-spec-draft/deploys/6930f8dfe9887b0008266c03
😎 Deploy Preview https://deploy-preview-1196--graphql-spec-draft.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

@martinbonnin martinbonnin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking into this! Few comments below

Comment on lines 323 to 324
- extend field MemberCoordinate Directives[const]?
- extend field description MemberCoordinate
Copy link
Contributor

@BoD BoD Oct 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was the intent to have the ability to add a description to fields? The other extensions don't allow that. What happens if the field already has a description? I suggest we only allow adding directives:

Suggested change
- extend field MemberCoordinate Directives[const]?
- extend field description MemberCoordinate
- extend field MemberCoordinate Directives[Const]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was suggested by @benjie on Discord. I think it makes sense, especially in an AI age where descriptions give valuable info to LLMs. But true it needs validation rules.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the heads up 👍.

Interesting! Although I would find it a bit odd to allow adding descriptions on fields but not on types and more (maybe this should go to a different PR that does that more broadly and keep this one focused on directives).

If we do want to keep this I think the grammar should look like:

Suggested change
- extend field MemberCoordinate Directives[const]?
- extend field description MemberCoordinate
- extend field MemberCoordinate Directives[Const]
- extend field Description MemberCoordinate

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be happy extending extend type to allow a prefixed description. The rule would be if it already has a description it would be invalid, just like adding the same interface twice.

Option 1:

"Description"
extend type MyType

Option 2:

extend type "Description" MyType

To me, the former is preferred over the latter, even though both are suboptimal.

There's also option 3:

extend "Description" type MyType

Or, and this may be the best option, option 4:

describe type MyType "Description"
describe field MyType.field "Description"
describe argument MyType.field(arg:) "Description"
describe enum MyEnum "Description"
describe enumValue MyEnum.VALUE "Description"
describe directive @foo "Description"
describe argument @foo(arg:) "Description"

Would mean the description is separate from the rest of the extension, but I think this is fine.

Thanks for highlighting this @BoD

Copy link
Member

@benjie benjie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A little editorial

FieldExtension :

- extend field MemberCoordinate Directives[Const]
- extend field Description MemberCoordinate
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Description is contentious, let's remove it for now.

Suggested change
- extend field Description MemberCoordinate

FieldExtension :

- extend field MemberCoordinate Directives[Const]
- extend field Description MemberCoordinate
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- extend field Description MemberCoordinate

- extend field Description MemberCoordinate

Field extensions are used to represent a field which has been extended from some
previously defined field. For example this may be a GraphQL service which is
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
previously defined field. For example this may be a GraphQL service which is
previously defined field. For example this may be used by a GraphQL service which is

In this example, we can deprecate the id field on the User type.

```graphql example
extend field User.name @deprecated(”Some reason”)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beware of typographic quotes!

Suggested change
extend field User.name @deprecated(Some reason)
extend field User.name @deprecated(reason: "Some reason")

extend field User.name @deprecated(”Some reason”)
```

** Field Validation **
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "Type" here relates to "type" as in "type-system" rather than type as in "object type".

Suggested change
** Field Validation **
**Type Validation**


** Field Validation **

Field validation have the potential to be invalid if incorrectly defined.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Field validation have the potential to be invalid if incorrectly defined.
Fields have the potential to be invalid if incorrectly defined.

Comment on lines +1129 to +1130
1. MemberCoordinate must be resolved to an existing field on a object or
interface type.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. MemberCoordinate must be resolved to an existing field on a object or
interface type.
1. MemberCoordinate must resolve to an existing field on a object or
interface type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants