Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistently use 'response name' not 'response key' #1147

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

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
Copy link

netlify bot commented Mar 10, 2025

Deploy Preview for graphql-spec-draft ready!

Name Link
🔨 Latest commit 15d7f5c
🔍 Latest deploy log https://app.netlify.com/sites/graphql-spec-draft/deploys/67cee6b5eaa1c400077a1a9b
😎 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
@@ -466,8 +466,9 @@ These two operations are semantically identical:

Alias : Name :

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!

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"
3 participants