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

Correct GraphQL variable name "text" to "type" #9529

Merged
merged 3 commits into from
May 11, 2022

Conversation

FumioNonaka-ksj
Copy link
Contributor

In the CodeSandbox example of "Mutations in Apollo Client", the correct variable name is "type" instead of "text".
https://codesandbox.io/s/mutations-example-app-final-tjoje

Checklist:

  • If this PR is a new feature, please reference an issue where a consensus about the design was reached (not necessary for small changes)
  • Make sure all of the significant new logic is covered by tests

@apollo-cla
Copy link

@FumioNonaka-ksj: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/

@benjamn
Copy link
Member

benjamn commented Mar 17, 2022

If type and text were being used inconsistently, we would welcome a fix, but it seems like you just changed text to type everywhere? I don't think I agree this find/replace improves the example, especially given the surrounding text.

The $text variable and the text field both refer to the text description of the to-do item. Of course a to-do item might also have a type, but that's not something this example needs, unless I'm missing something.

@FumioNonaka-ksj
Copy link
Contributor Author

FumioNonaka-ksj commented Mar 18, 2022

The variable name is inconsistent with "the completed version of the app". I spent more than an hour to have my trial app work. Then, please revise "Mutations > Example app final" of CodeSandbox.

Copy link
Contributor

@jpvajda jpvajda left a comment

Choose a reason for hiding this comment

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

I went ahead and doubled checked this change and this PR is a good adjustment as the examples we provide in code sandbox do use type so to be consistent this is a good change, especially when someone is working through our code samples and docs to learn. We appreciate the effort to fix this!

the complete version of the app is here: https://codesandbox.io/s/mutations-example-app-final-tjoje
the starter version of the app is here: https://codesandbox.io/s/mutations-example-app-start-gm7i5

they both use type

@jpvajda jpvajda self-assigned this May 11, 2022
Copy link
Member

@benjamn benjamn left a comment

Choose a reason for hiding this comment

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

Consistency across the tutorial materials is the goal, so I'm fine with switching to type instead of text as long as we're consistent!

docs/source/data/mutations.mdx Outdated Show resolved Hide resolved
@benjamn
Copy link
Member

benjamn commented May 11, 2022

@benjamn benjamn merged commit 2c08fbc into apollographql:main May 11, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants