-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
GraphQL anonymous operations have incorrect spacing after keyword #10655
Copy link
Copy link
Labels
difficulty:easyIssues that should be easy to fix. Resolve me on the train to work!Issues that should be easy to fix. Resolve me on the train to work!help wantedWe're a small group who can't get to every issue promptly. We’d appreciate help fixing this issue!We're a small group who can't get to every issue promptly. We’d appreciate help fixing this issue!lang:graphqlIssues affecting GraphQLIssues affecting GraphQLlocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.
Metadata
Metadata
Assignees
Labels
difficulty:easyIssues that should be easy to fix. Resolve me on the train to work!Issues that should be easy to fix. Resolve me on the train to work!help wantedWe're a small group who can't get to every issue promptly. We’d appreciate help fixing this issue!We're a small group who can't get to every issue promptly. We’d appreciate help fixing this issue!lang:graphqlIssues affecting GraphQLIssues affecting GraphQLlocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.
Formatting of GraphQL operations (eg a query) are formatted to incorrectly remove the space between the operation keyword and the variable body.
See this Prettier GraphQL playground for repro as of [email protected]:
Expect formatting:
Actual formatting:
This grammar for named and unnamed queries is designed similarly to named and unnamed functions in programming languages, and should be formatted similarly. For a point of comparison, see this Javascript Prettier playground which shows consistent spacing after the
functionkeyword.