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

Update validation page. #1803

Merged
merged 2 commits into from
Nov 15, 2024
Merged

Conversation

mandiwise
Copy link
Contributor

Description

This PR contains updated validation content for the Learn docs. Key changes include:

  • New section that discusses how/when validation errors are returned to a client (note: I have a new "Response" page in development, and I will add a link on the validation page that points to the new page for more info when it's ready)
  • Subheads for validation error examples to improve readability
  • Light editing throughout

@benjie @jorydotcom

Copy link

vercel bot commented Oct 30, 2024

@mandiwise is attempting to deploy a commit to the The GraphQL Foundation Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Member

@benjie benjie left a comment

Choose a reason for hiding this comment

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

This is looking good! Here are some light editorial suggestions (many of which apply to the original content).

src/pages/learn/validation.mdx Outdated Show resolved Hide resolved
src/pages/learn/validation.mdx Outdated Show resolved Hide resolved
src/pages/learn/validation.mdx Outdated Show resolved Hide resolved

```graphql
# { "graphiql": true }
# INVALID: favoriteSpaceship does not exist on Character
{
query {
Copy link
Member

Choose a reason for hiding this comment

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

Interested to know why you're moving away from the query shorthand here? It tends to be very rare that I see this - either the operation has a name and/or variables in which case you need query, or it has neither in which case it's very rare to see it in my experience.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've tended to see the opposite (inclusion of the query keyword) so I included it for clarity after all of the keywords are introduced on the operation pages. But I can remove it throughout if the shorthand syntax is the preferred convention.

Copy link
Member

Choose a reason for hiding this comment

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

Let's worry about that afterwards, if at all; it's much easier to replace /^query {$/ with { than the reverse - so keep going with the query keyword for now.

Interesting that your experience differs; I wonder what the ecosystem as a whole sees!

src/pages/learn/validation.mdx Outdated Show resolved Hide resolved
src/pages/learn/validation.mdx Outdated Show resolved Hide resolved
src/pages/learn/validation.mdx Outdated Show resolved Hide resolved
src/pages/learn/validation.mdx Outdated Show resolved Hide resolved
src/pages/learn/validation.mdx Outdated Show resolved Hide resolved
src/pages/learn/validation.mdx Outdated Show resolved Hide resolved
Co-authored-by: Benjie <benjie@jemjie.com>
Copy link
Member

@benjie benjie left a comment

Choose a reason for hiding this comment

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

Looks good to me! 🙌

Copy link

vercel bot commented Nov 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
graphql-github-io ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 15, 2024 5:47pm

@benjie benjie merged commit 38e3d17 into graphql:source Nov 15, 2024
4 checks passed
mandiwise added a commit to mandiwise/graphql.github.io that referenced this pull request Nov 19, 2024
Co-authored-by: Benjie <benjie@jemjie.com>
mandiwise added a commit to mandiwise/graphql.github.io that referenced this pull request Nov 22, 2024
Co-authored-by: Benjie <benjie@jemjie.com>
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.

2 participants