Skip to content

Conversation

@benjie
Copy link
Member

@benjie benjie commented Mar 10, 2025

Extracts the definition of "response key" from #1039, replaces occurrences of "response key" with "response name" for consistency, and links in relevant places.

Fixes #1144.

Why "response name" and not "response key"? Previously we used a mixture to mean the same thing, and GraphQL.js generally uses responseName (responseKey is only used in the new code relating to incremental delivery).

@benjie benjie added the ✏️ Editorial PR is non-normative or does not influence implementation label Mar 10, 2025
@netlify
Copy link

netlify bot commented Mar 10, 2025

Deploy Preview for graphql-spec-draft ready!

Name Link
🔨 Latest commit 43310af
🔍 Latest deploy log https://app.netlify.com/sites/graphql-spec-draft/deploys/6800542cd49cb80008f5895d
😎 Deploy Preview https://deploy-preview-1147--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 site configuration.

@benjie benjie changed the title Consistently use 'response key' not 'response name' Consistently use 'response name' not 'response key' Mar 10, 2025

By default a field's response key in the response object will use that field's
name. However, you can define a different response key by specifying an alias.
:: A _response name_ is the key in the response object which correlates with a
Copy link
Contributor

Choose a reason for hiding this comment

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

Thinking out loud -
Should response object be updated to response map in #1039?

But then this will not be accurate with incremental delivery, as a response name can also appear in the subsequent payloads. Should there be a new term (Response Data Tree?) to refer to the entire response data?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think this is referring to the object in the response representing the current Object Type's data, as opposed to the entire response which may use multiple names/aliases which may or may not overlap. It's a good point though, we should be clearer about this!

Copy link
Contributor

@mjmahone mjmahone left a comment

Choose a reason for hiding this comment

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

Personally I prefer response key but consistency is preferred to not, so not blocking.

@leebyron leebyron merged commit 4390617 into main Apr 17, 2025
9 checks passed
@leebyron leebyron deleted the response-key branch April 17, 2025 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✏️ Editorial PR is non-normative or does not influence implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clarify "response key" vs "response name"

9 participants