Skip to content

Allow multiple queries to be added together ( via a Monoid instance or similar? ) #793

Description

@silky

( thanks for the work on this amazing library! I love it :) )

Suppose I have two insert queries:

mutation InsertA ($id: uuid!) {
  insert_a_one (object: {id: $id}) { id }
}
mutation InsertB ($id: uuid!) {
  insert_b_one (object: {id: $id}) { id }
}

then, I believe it's legal to combine this into a single query that inserts these both at once:

mutation InsertBoth ($id_a: uuid!, $id_b: uuid!) {
  insert_a_one (object: {id: $id_a}) { id }
  insert_b_one (object: {id: $id_b}) { id }
}

it'd be really neat if I could perform this combination in haskell from the two independent queries, by say combining the two args:

insertBothArgs = insertAArgs <> insertBArgs 

this isn't currently possible, right? would be extremely handy! :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions