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

Clarify viewer, mention node field #20

Merged
merged 1 commit into from
Sep 19, 2016

Conversation

josephsavona
Copy link
Contributor

We've seen a fair number of people mistakenly put all of their fields under viewer, even when they don't need to. This leads to patterns where the route has just viewer, and then the container has something like fragment on Viewer { node(id: $id) } - super confusing and totally unnecessary, since you can do query { node(id: $id) }.

We've seen a fair number of people mistakenly put *all* of their fields under `viewer`, even when they don't need to. This leads to patterns where the route has just `viewer`, and then the container has something like `fragment on Viewer { node(id: $id) }` - super confusing and totally unnecessary, since you can do `query { node(id: $id) }`.
@josephsavona
Copy link
Contributor Author

The actual language itself here is just a rough draft; more important is to correct the information and ensure that users understand when to use viewer and when to use node.

@schickling schickling mentioned this pull request Sep 17, 2016
@schickling
Copy link
Collaborator

This a very good point @josephsavona. I think we should even be a bit more explicit and verbose about this as in fact most APIs get that (unintentionally) wrong.

@marktani would you mind merging that in and extending this second to reflect @josephsavona's thoughts? Also, see #20 for this.

Copy link
Member

@marktani marktani left a comment

Choose a reason for hiding this comment

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

I think the language is already very good.

We should extend on this by actually using the node field in the pokedex application and in the guide itself.

@marktani marktani merged commit e11e7a8 into learnrelay:master Sep 19, 2016
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.

None yet

3 participants