Skip to content

Missing arguments on fields in example queries #1000

@bBenchb

Description

@bBenchb

Hey,

I'm encountering an issue with the example queries generated for my rather complex merged API GraphQL schema. It appears that arguments on fields are being ignored, which affects the accuracy of the documentation.

Expected Behavior:
The generated queries should include the arguments on fields as shown below:

query countries(
  $limit: Int,
  $offset: Int,
  $languageCode: String!
) {
  countries(
    limit: $limit,
    offset: $offset
  ) {
    nodes {
      code
      name(languageCode: $languageCode)
    }
    totalCount
  }
}

Actual Behavior:

query countries(
  $limit: Int,
  $offset: Int
) {
  countries(
    limit: $limit,
    offset: $offset
  ) {
    nodes {
      code
      name
    }
    totalCount
  }
}

I also double checked the AST file that is generated out of all my .graphql schema files and this actually includes the arguments on the name field. So this must be an issue regarding the package.

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