Skip to content

Error when var is used in fragment only #25

Description

@Yagger

Error happens, when var is used in a fragment, but not on the top level

Steps to reproduce:

  1. initialize with Anilist public graph API elm-gql init https://graphql.anilist.co
  2. create the following query
query ($search: String!) {
  Page {
    ...foo
  }
}

fragment foo on Page {
  characters(search: $search) {
    name {
      full
    }
  }
}
  1. run elm-gql run ./api/Api/schema.json
  2. observe the following error in the log
--ELM GQL------------------------------------------------------src/myQuery.gql--

I found the following variables:

    $search

But I ran into an issue:

    $search is unused.

Here's what I think the variables should be:


Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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