Module

GraphQL.Client.Types

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

#GqlQuery Source

class GqlQuery :: forall k1 k2. k1 -> k2 -> Type -> Type -> Type -> Constraintclass (QueryReturns schema query returns, GqlQueryString query, VarsTypeChecked schema query, GqlOperation op, DirectivesTypeCheckTopLevel directives op query) <= GqlQuery directives op schema query returns | schema query -> returns, schema -> directives

Instances

#Client Source

newtype Client baseClient schema

Constructors

#QueryClient Source

class QueryClient baseClient queryOpts mutationOpts | baseClient -> queryOpts mutationOpts where

A type class for making a graphql request client. Apollo, urql and xhr2/Affjax baseClients are provided. If you wish to use a different base client, you can create your own client, make it an instance of QueryClient and pass it to query

Members

#SubscriptionClient Source

class SubscriptionClient baseClient opts | baseClient -> opts where

A type class for making graphql subscriptions. If you wish to use a different underlying client, you can create your own client, make it an instance of SubscriptionClient and pass it to subscription

Members

#subscriptionEventOpts Source

subscriptionEventOpts :: forall opts c. SubscriptionClient c opts => (opts -> opts) -> c -> String -> Json -> Emitter Json

#subscriptionEvent Source

subscriptionEvent :: forall opts c. SubscriptionClient c opts => c -> String -> Json -> Emitter Json

#WatchQueryClient Source

class WatchQueryClient baseClient opts | baseClient -> opts where

A type class for making graphql watch queries (observable queries). If you wish to use a different underlying client, you can create your own client, make it an instance of WatchQueryClient and pass it to watchQuery

Members

#watchQueryEventOpts Source

watchQueryEventOpts :: forall opts c. WatchQueryClient c opts => (opts -> opts) -> c -> String -> Json -> Emitter Json

#watchQueryEvent Source

watchQueryEvent :: forall opts c. WatchQueryClient c opts => c -> String -> Json -> Emitter Json

#GqlRes Source

type GqlRes res = { data_ :: Either JsonDecodeError res, errors :: Maybe (Array GqlError), errors_json :: Maybe (Array Json), extensions :: Maybe (Object Json) }

The full graphql query response, According to https://spec.graphql.org/June2018/#sec-Response-Format

#GqlResJson Source

newtype GqlResJson schema query res

Constructors