Module

Prospero.Http

Package
purescript-prospero
Repository
rowtype-yoga/purescript-prospero

#GraphQLRequest Source

type GraphQLRequest = { operationName :: Maybe String, query :: String, variables :: Maybe (Map String InputValue) }

#decodeRequest Source

decodeRequest :: ResponseValue -> Either String GraphQLRequest

Decode a GraphQL request from a ResponseValue (parsed JSON)

#encodeResponse Source

encodeResponse :: GraphQLResponse -> ResponseValue

Encode a GraphQL response to a ResponseValue (for JSON serialization)

#executeRequest Source

executeRequest :: forall ctx errs gql. GraphQL ctx errs gql -> GraphQLRequest -> Om ctx errs GraphQLResponse

Execute a GraphQL request against a schema, returning a structured response

#executeRequestWith Source

executeRequestWith :: forall ctx errs gql. Array (Wrapper ctx errs) -> GraphQL ctx errs gql -> GraphQLRequest -> Om ctx errs GraphQLResponse

Execute a GraphQL request with wrappers applied

#query Source

query :: forall ctx errs gql. GraphQL ctx errs gql -> String -> Om ctx errs GraphQLResponse

Execute a GraphQL query string against a schema

#queryWith Source

queryWith :: forall ctx errs gql. Array (Wrapper ctx errs) -> GraphQL ctx errs gql -> String -> Om ctx errs GraphQLResponse

Execute a GraphQL query string with wrappers