Skip to content

docs: type generation for graphql servers #4376

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

Open
wants to merge 10 commits into
base: 16.x.x
Choose a base branch
from

Conversation

sarahxsanders
Copy link
Contributor

Adds new guide: Type Generation for GraphQL Servers

This is a part of the effort to expand GraphQL.js documentation

@sarahxsanders sarahxsanders requested a review from a team as a code owner April 22, 2025 23:19
@sarahxsanders sarahxsanders changed the title docs: add guide for graphQL server type generation docs: type generation for graphql servers Apr 22, 2025
Copy link

Hi @sarahxsanders, I'm @github-actions bot happy to help you with this PR 👋

Supported commands

Please post this commands in separate comments and only one per comment:

  • @github-actions run-benchmark - Run benchmark comparing base and merge commits for this PR
  • @github-actions publish-pr-on-npm - Build package from this PR and publish it on NPM

Copy link

@eddeee888 eddeee888 left a comment

Choose a reason for hiding this comment

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

Thank you @sarahxsanders !
I'm from the GraphQL Codegen team at The Guild. I've left some minor comments about our recommendation when using Codegen. Keen to hear your thoughts!

@JoviDeCroock
Copy link
Member

I've fixed CI after rebasing this branch it will work again, apologies for the issues

@eddeee888
Copy link

Hi @sarahxsanders , thanks for making the changes to recommend presets.
Since preset config and benefits are very different from the base plugins, I wonder if there's a chance I could write those sections? Happy to provide direction too, but it's going to be very different from what we currently have 🙂

@sarahxsanders
Copy link
Contributor Author

@eddeee888 you are absolutely welcome to write those sections! happy to collab if you want a review or anything

@eddeee888
Copy link

Thank you @sarahxsanders ! I'll draft something up this week, and let you know

@eddeee888
Copy link

eddeee888 commented May 15, 2025

Hi @sarahxsanders, I've left a draft here: https://github.com/graphql/graphql-js/pull/4376/files#r2091097002
Please let me know what you think!

@sarahxsanders
Copy link
Contributor Author

Hi @sarahxsanders, I've left a draft here: https://github.com/graphql/graphql-js/pull/4376/files#r2091097002 Please let me know what you think!

Hello @eddeee888! Thanks so much for your draft, I have added that (only changed a few small nits for formatting/style guide stuff) in my latest commit

Copy link

@eddeee888 eddeee888 left a comment

Choose a reason for hiding this comment

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

Thank you @sarahxsanders ! Feels like we are almost there!

I have some thoughts/feedback, keen to hear your opinions:

  • We have not shown how to install Codegen packages in this doc. Do you think we should? I'm thinking it would be useful to readers who are new to GraphQL codegen.
  • I have left recommendations to add markdown meta to show filenames to help readers visualise the file they are looking at

I'll share this with the codegen team to see if they have any more feedback!

@sarahxsanders
Copy link
Contributor Author

Thank you @sarahxsanders ! Feels like we are almost there!

I have some thoughts/feedback, keen to hear your opinions:

  • We have not shown how to install Codegen packages in this doc. Do you think we should? I'm thinking it would be useful to readers who are new to GraphQL codegen.
  • I have left recommendations to add markdown meta to show filenames to help readers visualise the file they are looking at

I'll share this with the codegen team to see if they have any more feedback!

@eddeee888 Approved those suggestions, thank you! :)

I agree it could be helpful to show how to install the Codegen packages. Were you thinking just the core @graphql-codegen/cli, or also including common plugins like typescript and typescript-resolvers? I’m also not sure if we want to assume a particular setup like a specific framework for example. Curious how you’d approach that, and whether the Codegen team has any thoughts!!

@sarahxsanders sarahxsanders requested a review from eddeee888 May 21, 2025 00:19
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.

3 participants