Directives at query or mutation locations not supported
jorgebay opened this issue · comments
Jorge Bay commented
The spec allows directives at QUERY
and MUTATION
locations but code generation plugin doesn't.
For example, the following valid graphql is not supported by the plugin:
mutation @myModifier CreateReviewForEpisode($review: ReviewInput!) {
val1: createReview(review: $review),
val2: trackReview(review: $review),
}
Moncef AOUDIA commented
Please open an issue in Apollo Android.
Jorge Bay commented
Thanks for the guidance, I've created a ticket there apollographql/apollo-kotlin#2661
Jorge Bay commented
TIL the correct order is the following:
mutation CreateReviewForEpisode($review: ReviewInput!) @myModifier {
val1: createReview(review: $review),
val2: trackReview(review: $review),
}
With the directive after the name. It works as expected that way, sorry for the noise.