Skip to content

Validation fails on variables used in fragments. #150

@todesstoss

Description

@todesstoss

Hello, my query validation fails with error message:
Variable "$variableName" is never used in operation "OperationName",
while "$variableName" is used in this operation, but located in fragment which is imported from another file.

import fieldsFragment from './fragment'

const Query = gql`
  query OperationName($variableName: String!) {
    fileld {
      ...fragmentName
    }
  }
  ${fieldsFragment}
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions