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

Docs should explain "data" object in results #754

Open
JVimes opened this issue Aug 15, 2019 · 2 comments
Open

Docs should explain "data" object in results #754

JVimes opened this issue Aug 15, 2019 · 2 comments

Comments

@JVimes
Copy link

JVimes commented Aug 15, 2019

Maybe I just missed it, but the docs mysteriously show a "data" object that wasn't queried for, and I can't find the explanation.

image

Newbies like me could use:

  • An explanation early in the docs.
  • Is this a convention or requirement?
  • It might be worth also mentioning the "errors" object I see in later examples.
@carolstran
Copy link
Member

👋🏼 @JVimes, thanks for opening an issue on the GraphQL documentation! I totally agree with you, this should be more clear early-on in the documentation and learning journey through the docs.

I'd lean towards adding it on the Queries and Mutations, right after the introduction and where this data object is first introduced. Would you agree?

I also agree with adding a similar note about the errors object. I wonder if that would be best when the first example is introduced (in Schemas and Types) or mentioned in the note about data (or both). Would be curious to hear what you think!

@JVimes
Copy link
Author

JVimes commented Sep 1, 2020

Thank you @carolstran! Yes, I think it'll work well to define each (data and errors) with its first appearance in the docs. Consider briefly mentioning errors when you introduce data. This will satisfy curiosity as to why the data is not at the root level (to leave a place for errors).

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

No branches or pull requests

2 participants