You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
query ($search: String!) {
Page {
...foo
}
}
fragment foo on Page {
characters(search: $search) {
name {
full
}
}
}
run elm-gql run ./api/Api/schema.json
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:
The error thrown was "can't find fragment on type SubRecord".
If I re-run elm-gql the error was ignored but the file was unchanged.
Sometimes it complained about other (valid) fragments but most times it complained about the type nested alongside the fragment that used a variable.
To find the actual error, I inlined the SubRecord fragment into Record - then I got the unused variable error.
Error happens, when var is used in a fragment, but not on the top level
Steps to reproduce:
elm-gql init https://graphql.anilist.co
elm-gql run ./api/Api/schema.json
The text was updated successfully, but these errors were encountered: