syrup icon indicating copy to clipboard operation
syrup copied to clipboard

Support object literals in GraphQL operations

Open samrmur opened this issue 3 years ago • 0 comments

Problem

Currently, you can create a GraphQL operation where object arguments can be defined through GraphQL arguments but not through arguments literals.

Syrup seems to strip curly brackets and commas from the object literal.

Examples

Query with object literal

query NodeQuery {
  node(complexId: {
    id: "something",
    locale: "en"
  }) {
    id
  }
}

Produced error

Unterminated argument list starting at line: 3 column: 6 associated with the following input:
 ✓      query NodeQuery {
 ✓      __typename
💥      node(complexId: id: "something"locale: "en") {
💥

samrmur avatar Sep 13 '21 19:09 samrmur