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

Support operations with client directives #77

Closed
rccc opened this issue Nov 9, 2022 · 3 comments · Fixed by #78
Closed

Support operations with client directives #77

rccc opened this issue Nov 9, 2022 · 3 comments · Fixed by #78
Labels
bug An error within Sailor

Comments

@rccc
Copy link

rccc commented Nov 9, 2022

Hello,

I am trying to use directives :

query MyQuery($withNames: Boolean!, $withDescriptors: Boolean!) {
  molecule(limit: 5) {
    ...names @include(if: $withNames)
    ...descriptors @include(if: $withDescriptors) 
  }
}

but vendor/bin/sailor says:

"Variable \"$withNames\" is never used in operation \"MoleculeExport\"
"Variable \"$withDescriptors\" is never used in operation \"MoleculeExport\"
@rccc rccc changed the title Directives Are directives declarations supported by generator ? Nov 9, 2022
@spawnia spawnia changed the title Are directives declarations supported by generator ? Support operations with client directives Nov 9, 2022
@spawnia spawnia added the bug An error within Sailor label Nov 9, 2022
spawnia added a commit that referenced this issue Nov 9, 2022
spawnia added a commit that referenced this issue Nov 9, 2022
@spawnia
Copy link
Owner

spawnia commented Nov 9, 2022

Thanks for the report, fixed with https://github.com/spawnia/sailor/releases/tag/v0.26.1.

@rccc
Copy link
Author

rccc commented Nov 10, 2022

:)

Many thanks to you !

I wish you a very nice day.

@spawnia
Copy link
Owner

spawnia commented Nov 10, 2022

Thinking about this some more, I also found that Sailor currently does not handle omission of fields with @skip or @include. I plan to fix this in #79.

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

Successfully merging a pull request may close this issue.

2 participants