ocaml-graphql-server icon indicating copy to clipboard operation
ocaml-graphql-server copied to clipboard

Fields with differing arguments shouldn't be allowed

Open dwwoelfel opened this issue 6 years ago • 0 comments

Queries with differing arguments for the same field should not be allowed.

An example of a query that should fail (see swapi example)

query AllFilms {
  allFilms(first: 1) {
    totalCount
  }
  allFilms(first: 2) {
    pageInfo {
      hasNextPage
    }
  }
}

An example of a query that should succeed (see swapi example)

query AllFilms {
  allFilms(first: 1) {
    totalCount
  }
  allFilms(first: 1) {
    pageInfo {
      hasNextPage
    }
  }
}

If #168 gets merged, merge_selections would be a good place to do the check for conflicting arguments.

dwwoelfel avatar Aug 28 '19 21:08 dwwoelfel