Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variable define a query and use inside a fragment #269

Open
alexis-regnaud opened this issue May 21, 2020 · 0 comments
Open

Variable define a query and use inside a fragment #269

alexis-regnaud opened this issue May 21, 2020 · 0 comments

Comments

@alexis-regnaud
Copy link

alexis-regnaud commented May 21, 2020

Hi,
I have this lint error :
Screen Shot 2020-05-21 at 10 15 41 AM

Here my Query :

#import './user-fragment.gql'

query GetUser($id: Int!, $filter: String, $sorts: [String!]) {
  user(id: $id) {
    ...UserFragment
  }
}

And here my Fragment :

fragment UserFragment on User {
  id
  username
  name
  email
  time_zone
  state
  custom_expression_access
  user_roles(filter: $filter, sorts: $sorts) {
    id
    role {
      id
      name
      type
    }
  }
}

The linter seems not recognized that $filter is use by the Fragment and send me a error. Do we have a solution for this kind of issue or I have to add a // eslint-disable-next-line in the Query file ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant