parser icon indicating copy to clipboard operation
parser copied to clipboard

Formatter makes invalid GraphQL for unnamed query

Open nightroman opened this issue 3 months ago • 0 comments

Please find attached XUnit test project with the problem case ready to run:

Test.zip

This unnamed GraphQL query

query ($after: String, $first: Int!, $workspaceUrl: String!) {
  desProjects(after: $after, first: $first, workspaceUrl: $workspaceUrl) {
    nodes {
      id
      name
      previewUrl
      description
    }
    pageInfo {
      endCursor
      hasNextPage
    }
  }
}

becomes invalid GraphQL after formatting, due to removed query:

($after: String, $first: Int!, $workspaceUrl: String!) {
  desProjects(after: $after, first: $first, workspaceUrl: $workspaceUrl) {
...

nightroman avatar Oct 28 '25 01:10 nightroman