GraphQL.Client.Query
- Package
- purescript-graphql-client
- Repository
- OxfordAbstracts/purescript-graphql-client
#decodeGqlRes Source
decodeGqlRes :: forall a. (Json -> Either JsonDecodeError a) -> Json -> Either JsonDecodeError a#getFullRes Source
getFullRes :: forall res. (Json -> Either JsonDecodeError res) -> Json -> GqlRes res#mutation Source
mutation :: forall client directives schema mutation returns queryOpts mutationOpts sr. QueryClient client queryOpts mutationOpts => GqlQuery directives OpMutation schema mutation returns => DecodeJson returns => (Client client { directives :: Proxy directives, mutation :: schema | sr }) -> String -> mutation -> Aff returns#mutationFullRes Source
mutationFullRes :: forall client directives schema mutation returns queryOpts mutationOpts sr. QueryClient client queryOpts mutationOpts => GqlQuery directives OpMutation schema mutation returns => (Json -> Either JsonDecodeError returns) -> (mutationOpts -> mutationOpts) -> (Client client { directives :: Proxy directives, query :: schema | sr }) -> String -> mutation -> Aff (GqlRes returns)Run a graphQL mutation, getting the full response, According to https://spec.graphql.org/June2018/#sec-Response-Format
#mutationJson Source
mutationJson :: forall client directives schema mutation returns queryOpts mutationOpts sr. QueryClient client queryOpts mutationOpts => GqlQuery directives OpMutation schema mutation returns => (mutationOpts -> mutationOpts) -> (Client client { directives :: Proxy directives, mutation :: schema | sr }) -> String -> mutation -> Aff (GqlResJson schema mutation returns)Run a graphQL mutation, returning the response as json with phantom types The json will be of the format: https://spec.graphql.org/June2018/#sec-Response-Format
#mutationOpts Source
mutationOpts :: forall client directives schema query returns queryOpts mutationOpts sr. QueryClient client queryOpts mutationOpts => GqlQuery directives OpMutation schema query returns => DecodeJson returns => (mutationOpts -> mutationOpts) -> (Client client { directives :: Proxy directives, mutation :: schema | sr }) -> String -> query -> Aff returnsRun a graphQL query with a custom decoder and custom options
#mutationOptsWithDecoder Source
mutationOptsWithDecoder :: forall client directives schema query returns queryOpts mutationOpts sr. QueryClient client queryOpts mutationOpts => GqlQuery directives OpMutation schema query returns => (Json -> Either JsonDecodeError returns) -> (mutationOpts -> mutationOpts) -> (Client client { directives :: Proxy directives, mutation :: schema | sr }) -> String -> query -> Aff returnsRun a graphQL query with a custom decoder and custom options
#mutationWithDecoder Source
mutationWithDecoder :: forall client directives schema mutation returns queryOpts mutationOpts sr. QueryClient client queryOpts mutationOpts => GqlQuery directives OpMutation schema mutation returns => (Json -> Either JsonDecodeError returns) -> (Client client { directives :: Proxy directives, mutation :: schema | sr }) -> String -> mutation -> Aff returns#mutation_ Source
mutation_ :: forall directives schema mutation returns. GqlQuery directives OpMutation schema mutation returns => DecodeJson returns => URL -> Proxy schema -> String -> mutation -> Aff returns#query Source
query :: forall client directives schema query returns queryOpts mutationOpts sr. QueryClient client queryOpts mutationOpts => GqlQuery directives OpQuery schema query returns => DecodeJson returns => (Client client { directives :: Proxy directives, query :: schema | sr }) -> String -> query -> Aff returnsRun a graphQL query
#queryFullRes Source
queryFullRes :: forall client directives schema query returns queryOpts mutationOpts sr. QueryClient client queryOpts mutationOpts => GqlQuery directives OpQuery schema query returns => (Json -> Either JsonDecodeError returns) -> (queryOpts -> queryOpts) -> (Client client { directives :: Proxy directives, query :: schema | sr }) -> String -> query -> Aff (GqlRes returns)Run a graphQL query, getting the full response, According to https://spec.graphql.org/June2018/#sec-Response-Format
#queryJson Source
queryJson :: forall client directives schema query returns queryOpts mutationOpts sr. QueryClient client queryOpts mutationOpts => GqlQuery directives OpQuery schema query returns => (queryOpts -> queryOpts) -> (Client client { directives :: Proxy directives, query :: schema | sr }) -> String -> query -> Aff (GqlResJson schema query returns)Run a graphQL query, returning the response as json with phantom types The json will be of the format: https://spec.graphql.org/June2018/#sec-Response-Format
#queryOpts Source
queryOpts :: forall client directives schema query returns queryOpts mutationOpts sr. QueryClient client queryOpts mutationOpts => GqlQuery directives OpQuery schema query returns => DecodeJson returns => (queryOpts -> queryOpts) -> (Client client { directives :: Proxy directives, query :: schema | sr }) -> String -> query -> Aff returnsRun a graphQL query with custom options
#queryOptsWithDecoder Source
queryOptsWithDecoder :: forall client directives schema query returns queryOpts mutationOpts sr. QueryClient client queryOpts mutationOpts => GqlQuery directives OpQuery schema query returns => (Json -> Either JsonDecodeError returns) -> (queryOpts -> queryOpts) -> (Client client { directives :: Proxy directives, query :: schema | sr }) -> String -> query -> Aff returnsRun a graphQL query with a custom decoder and custom options
#queryWithDecoder Source
queryWithDecoder :: forall client directives schema query returns queryOpts mutationOpts sr. QueryClient client queryOpts mutationOpts => GqlQuery directives OpQuery schema query returns => (Json -> Either JsonDecodeError returns) -> (Client client { directives :: Proxy directives, query :: schema | sr }) -> String -> query -> Aff returnsRun a graphQL query with a custom decoder
#query_ Source
query_ :: forall directives schema query returns. GqlQuery directives OpQuery schema query returns => DecodeJson returns => URL -> Proxy schema -> String -> query -> Aff returnsA create client and query shortcut that creates a global client and caches it for future calls.
query is a safer option for production environments and should generally be used
- Modules
- GraphQL.
Client. Alias - GraphQL.
Client. Alias. Dynamic - GraphQL.
Client. Args - GraphQL.
Client. Args. AllowedMismatch - GraphQL.
Client. ArrayOf - GraphQL.
Client. AsGql - 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. Directive - GraphQL.
Client. Directive. Definition - GraphQL.
Client. Directive. Location - GraphQL.
Client. ErrorBoundary - GraphQL.
Client. GqlError - GraphQL.
Client. GqlType - GraphQL.
Client. ID - GraphQL.
Client. NullArray - GraphQL.
Client. Operation - 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. WatchQuery - GraphQL.
Hasura. ComparisonExp - GraphQL.
Hasura. Decode - GraphQL.
Hasura. DecodeLiberal - GraphQL.
Hasura. Encode