teamwalnut / graphql-ppx

GraphQL language primitives for ReScript/ReasonML written in ReasonML
https://graphql-ppx.com
MIT License
257 stars 53 forks source link

Support directives on VARIABLE_DEFINITION #277

Open lozlow opened 2 years ago

lozlow commented 2 years ago

When running the ppx on this mutation

module AddEntry = %graphql(`
  mutation addEntry($body: String! @encrypted) {
    insert_entries_one(object: { body: $body}) {
      id
      body
    }
  }
`)

I get

  3 ┆
  4 ┆ module AddEntry = %graphql(`
  5 ┆   mutation addEntry($body: String! @encrypted) {
  6 ┆     insert_entries_one(object: { body: $body}) {
  7 ┆       id

  Unexpected token @

This is supported by the graphql spec: https://github.com/graphql/graphql-spec/pull/510