Module

GraphQL.Client.Alias.Dynamic

Package
purescript-graphql-client
Repository
OxfordAbstracts/purescript-graphql-client

#Spread Source

data Spread alias args fields

Used for creating spread aliases dynamically eq:

mutation myUpdates {
  _1: update_users(where: {id : 1}, _set: { value: 10 }) { affected_rows }
  _2: update_users(where: {id : 2}, _set: { value: 15 }) { affected_rows }
  _3: update_users(where: {id : 3}, _set: { value: 20 }) { affected_rows }
}

Constructors

#SpreadRes Source

newtype SpreadRes a

The return type of a query made with a dynamic alias spread This type has encodes/decodes as an object with "_n" as a key

Constructors

Instances

#encodeSpreadRes Source

encodeSpreadRes :: forall a. (a -> Json) -> (SpreadRes a) -> Json