Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upprintTypeDefinitions does not generate schema.gql when not passing an empty object #26213
Comments
|
Hiya! This issue has gone quiet. Spooky quiet. We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here. Thanks for being a part of the Gatsby community! |
|
Hi there @juan871003! Thanks for bringing this up. I agree that adding an example would help make these docs clearer. I'm adding the Hacktoberfest label to this issue so that hopefully a contributor from our community can pick this up. Steps to resolve this issue
Open a pull request
|
|
Can I take this @meganesu? |
|
@Kolkies of course, go for it! Feel free to reach out if you have any questions. |


Summary
According to the documentation in https://www.gatsbyjs.org/docs/actions/#printTypeDefinitions all parameters are optional.
I tried using
actions.printTypeDefinitions();but it didn't generate theschema.gqlfile it should generate.After some research I found out that I should pass an empty object like this:
actions.printTypeDefinitions({});I recommend stating this in the documentation, perhaps with an example:
Some recommended topics to cover:
Motivation
Adding sample code makes documentation much clearer.