Skip to content

Formatter makes invalid GraphQL for unnamed query #401

@nightroman

Description

@nightroman

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) {
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions