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 schema and types docs #1800

Merged
merged 12 commits into from
Nov 8, 2024
Merged

Conversation

mandiwise
Copy link
Contributor

Description

This PR contains updated content for the Schema and Types page in the Learn docs. Key changes include:

  • An updated intro and a new "next steps" section at the end of the page
  • A new section on type system directives
  • A new section on documentation (descriptions and comments)
  • Updated/expanded content and examples for all existing sections
  • Standardization of capitalization and naming for named types

Note that the intention is to swap the order of this page in the left nav so that it comes before the Queries and Mutations content, but this will be addressed in the next PR that updates that operation-related content.

@benjie @jorydotcom

jonathanberger and others added 4 commits October 10, 2024 18:38
Simplify description of Query and Mutation types.

I think it's safe not to introduce the `schema` keyword in the second page that beginners will come to when learning about GraphQL. Changing the names of the root operation types is, I assume, rare, and so I'm suggesting with these edits to omit going into that detail.
Copy link

vercel bot commented Oct 23, 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.

@benjie
Copy link
Member

benjie commented Oct 24, 2024

If possible, please rebase these changes onto #1794

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.

I wonder if we should be linking to the draft spec rather than a specific release. Everything in the draft has passed the RFC process and barring some exceptional circumstances will make it into the next official release - it's the version that implementations should be following/implementing, and the links are more evergreen (linking to section titles should be fine, but linking to specific words within a paragraph is probably riskier!).

src/pages/learn/schema.mdx Outdated Show resolved Hide resolved
src/pages/learn/schema.mdx Outdated Show resolved Hide resolved
@mandiwise
Copy link
Contributor Author

If possible, please rebase these changes onto #1794

@benjie The commits from jonathanberger/patch-1 have been merged into this branch now with the conflicts resolved.

@mandiwise
Copy link
Contributor Author

I wonder if we should be linking to the draft spec rather than a specific release. Everything in the draft has passed the RFC process and barring some exceptional circumstances will make it into the next official release - it's the version that implementations should be following/implementing, and the links are more evergreen (linking to section titles should be fine, but linking to specific words within a paragraph is probably riskier!).

@benjie I'm happy to swap out the URLs to use the draft spec path so they're more stable over time. The other option I can think of would be to create something like a <SpecLink section="some-section-id"> component to use throughout the MDX files so that when a new release of the spec is finalized the URL will only need to be updated in the component file. Let me know what you think.

@benjie
Copy link
Member

benjie commented Oct 25, 2024

The MDX component is an interesting approach! I think we should just link to the draft - our general advice to everyone is to follow the draft, and the draft is where any typo fixes and other such things will go so it's generally more correct/up-to-date.

@mandiwise
Copy link
Contributor Author

Spec links have now been changed to the draft path.

Copy link

vercel bot commented Oct 27, 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 7, 2024 6:26pm

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 excellent! I've included some suggested edits, but I think this is a great improvement over the existing text - excellent work 🙌

src/pages/learn/schema.mdx Outdated Show resolved Hide resolved
src/pages/learn/schema.mdx Show resolved Hide resolved
src/pages/learn/schema.mdx Outdated Show resolved Hide resolved
src/pages/learn/schema.mdx Outdated Show resolved Hide resolved
src/pages/learn/schema.mdx Outdated Show resolved Hide resolved
src/pages/learn/schema.mdx Outdated Show resolved Hide resolved
src/pages/learn/schema.mdx Show resolved Hide resolved
src/pages/learn/schema.mdx Outdated Show resolved Hide resolved
src/pages/learn/schema.mdx Outdated Show resolved Hide resolved
src/pages/learn/schema.mdx Show resolved Hide resolved
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.

Looking good just the bulleted list of schema build methods and maybe the linking of the defined terms left to consider I think!

@mandiwise
Copy link
Contributor Author

Looking good just the bulleted list of schema build methods and maybe the linking of the defined terms left to consider I think!

These changes have been committed now.

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.

Awesome; this is great! 🙌

@benjie benjie merged commit 08ec14b into graphql:source Nov 8, 2024
4 checks passed
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.

5 participants