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

Support Prettier with writeSchema() #111

Closed
brikou opened this issue Sep 4, 2018 · 2 comments
Closed

Support Prettier with writeSchema() #111

brikou opened this issue Sep 4, 2018 · 2 comments

Comments

@brikou
Copy link

brikou commented Sep 4, 2018

It could be really nice to have prettier support, reading found .prettierrc within the project WDYT?

@wtrocki
Copy link

wtrocki commented Feb 4, 2020

You can have post action that supports prettier. Generally, there are couple ways to format things so it is best to do it post write. Prettier has really nice programmatic api if needed but generally there could be many cases here like - prettier being part of the mono repo etc. It is easier to:

  • have post script action to perform prettier in your project
  • Add prettier in code after writing schema

@danielrearden
Copy link
Collaborator

Closing this since graphql-config no longer exposes a writeSchema method. If you need to print the schema, you can use getSchema or getSchemaSync and then call printSchema from the graphql module on the returned GraphQLSchema object.

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

No branches or pull requests

3 participants