graphql-ppx icon indicating copy to clipboard operation
graphql-ppx copied to clipboard

Support directives on VARIABLE_DEFINITION

Open lozlow opened this issue 2 years ago • 0 comments

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

lozlow avatar Apr 17 '22 18:04 lozlow