Skip to content

Prettier for the schema #7651

Closed Answered by trevor-scheer
alan345 asked this question in General
Discussion options

You must be logged in to vote

Interesting predicament, hadn't considered it when we started pushing this recommendation. Prettier recognizes the gql tag though, so you can either use the real thing (and pass a DocumentNode to Apollo Server instead of a string) or fake it like so:

const gql = String.raw;

const typeDefs = gql`
  ...
`;

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by trevor-scheer
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants