Module
GraphQL.Client.BaseClients.Apollo
- Package
- purescript-graphql-client
- Repository
- OxfordAbstracts/purescript-graphql-client
Creates GraphQL Apollo clients
#ApolloClientOptions Source
type ApolloClientOptions = { authToken :: Maybe String, headers :: Array RequestHeader, url :: URL }
#ApolloSubClientOptions Source
type ApolloSubClientOptions = { authToken :: Maybe String, headers :: Array RequestHeader, url :: URL, websocketUrl :: URL }
#ApolloClient Source
data ApolloClient
Apollo client to make graphQL queries and mutations. From the @apollo/client npm module
Instances
#ApolloSubClient Source
data ApolloSubClient
Apollo client to make graphQL queries, mutations and subscriptions. Requires a web socket graphQL server. From the @apollo/client npm module
Instances
QueryClient ApolloSubClient { errorPolicy :: ErrorPolicy, fetchPolicy :: Maybe FetchPolicy } MutationOpts
SubscriptionClient ApolloSubClient QueryOpts
IsApollo ApolloSubClient
WatchQueryClient ApolloSubClient QueryOpts
#MutationOpts Source
type MutationOpts = { errorPolicy :: ErrorPolicy, optimisticResponse :: Maybe Json, refetchQueries :: Array String, update :: Maybe (Effect Unit) }
Instances
QueryClient ApolloClient QueryOpts MutationOpts
QueryClient ApolloSubClient { errorPolicy :: ErrorPolicy, fetchPolicy :: Maybe FetchPolicy } MutationOpts
#QueryOpts Source
type QueryOpts = { errorPolicy :: ErrorPolicy, fetchPolicy :: Maybe FetchPolicy }
Instances
#createClient Source
createClient :: forall querySchema mutationSchema subscriptionSchema. ApolloClientOptions -> Effect (Client ApolloClient querySchema mutationSchema subscriptionSchema)
#createSubscriptionClient Source
createSubscriptionClient :: forall querySchema mutationSchema subscriptionSchema. ApolloSubClientOptions -> Effect (Client ApolloSubClient querySchema mutationSchema subscriptionSchema)
#IsApollo Source
class IsApollo :: forall k. k -> Constraint
class IsApollo cl
Instances
#updateCacheJson Source
updateCacheJson :: forall s m q qSchema c res. IsApollo c => GqlQuery qSchema q res => EncodeJson res => DecodeJson res => Client c qSchema m s -> q -> (res -> res) -> Effect Unit
#updateCache Source
updateCache :: forall c qSchema q m s res. IsApollo c => GqlQuery qSchema q res => (res -> Json) -> (Json -> Either JsonDecodeError res) -> (Client c qSchema m s) -> q -> (res -> res) -> Effect Unit
- Modules
- Data.
GraphQL. AST - Data.
GraphQL. Parser - GraphQL.
Client. Alias - GraphQL.
Client. Alias. Dynamic - GraphQL.
Client. Args - GraphQL.
Client. BaseClients. Affjax. Internal - GraphQL.
Client. BaseClients. Affjax. Node - GraphQL.
Client. BaseClients. Affjax. Web - GraphQL.
Client. BaseClients. Apollo - GraphQL.
Client. BaseClients. Apollo. ErrorPolicy - GraphQL.
Client. BaseClients. Apollo. FetchPolicy - GraphQL.
Client. BaseClients. Urql - GraphQL.
Client. CodeGen. GetSymbols - GraphQL.
Client. CodeGen. Js - GraphQL.
Client. CodeGen. Lines - GraphQL.
Client. CodeGen. Query - GraphQL.
Client. CodeGen. Schema - GraphQL.
Client. CodeGen. Template. Enum - GraphQL.
Client. CodeGen. Template. Schema - GraphQL.
Client. CodeGen. Transform. NullableOverrides - GraphQL.
Client. CodeGen. Types - GraphQL.
Client. ID - GraphQL.
Client. Query - GraphQL.
Client. QueryReturns - GraphQL.
Client. SafeQueryName - GraphQL.
Client. Subscription - GraphQL.
Client. ToGqlString - GraphQL.
Client. Types - GraphQL.
Client. Union - GraphQL.
Client. Variable - GraphQL.
Client. Variables - GraphQL.
Client. Variables. TypeName - GraphQL.
Client. WatchQuery - GraphQL.
Hasura. Array - GraphQL.
Hasura. ComparisonExp - GraphQL.
Hasura. Decode - GraphQL.
Hasura. DecodeLiberal - GraphQL.
Hasura. Encode