Module

Prospero.RootResolver

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

#RecordRow Source

class RecordRow :: Type -> Row Type -> Constraintclass RecordRow (rec :: Type) (row :: Row Type) | rec -> row

Extracts the row from a Record type

Instances

#ImplType Source

class ImplType :: Type -> Row Type -> RowList Type -> Row Type -> Constraintclass ImplType (ctx :: Type) (errs :: Row Type) (schemaRL :: RowList Type) (implRow :: Row Type) | ctx errs schemaRL -> implRow

Derives the Om-wrapped implementation row from a pure schema row. Plain fields get wrapped in Om, function fields get their return type wrapped.

Instances

#SplitSchema Source

class SplitSchema :: Type -> Row Type -> RowList Type -> Row Type -> Row Type -> Row Type -> Row Type -> Constraintclass SplitSchema (ctx :: Type) (errs :: Row Type) (schemaRL :: RowList Type) (implRow :: Row Type) (qRow :: Row Type) (mRow :: Row Type) (sRow :: Row Type) | ctx errs schemaRL -> implRow qRow mRow sRow

Walks a schema RowList and partitions fields into query/mutation/subscription rows based on the Query/Mutation/Subscription wrapper, plus a combined implementation row.

Instances

#GraphQL Source

type GraphQL :: Type -> Row Type -> Type -> Typetype GraphQL ctx errs schemaGql = { mutation :: Maybe GqlType, mutationStep :: Maybe (Step ctx errs), query :: GqlType, queryStep :: Step ctx errs, subscription :: Maybe GqlType, subscriptionStep :: Maybe (Step ctx errs) }

#graphql Source

graphql :: forall @schema schemaRow schemaRL ctx errs implRow qRow mRow sRow qGql mGql sGql. RecordRow schema schemaRow => RowToList schemaRow schemaRL => SplitSchema ctx errs schemaRL implRow qRow mRow sRow => GqlSchema ctx errs (Record qRow) qGql => GqlSchema ctx errs (Record mRow) mGql => GqlSchema ctx errs (Record sRow) sGql => Record implRow -> GraphQL ctx errs qGql

#mkGraphQL Source

mkGraphQL :: forall ctx errs q qGql. GqlSchema ctx errs (Record q) qGql => Record q -> GraphQL ctx errs qGql

#mkGraphQL' Source

mkGraphQL' :: forall ctx errs q qGql. GqlSchema ctx errs (Record q) qGql => { introspection :: Boolean } -> Record q -> GraphQL ctx errs qGql

#mkGraphQLOpts Source

mkGraphQLOpts :: forall ctx errs q qGql. GqlSchema ctx errs (Record q) qGql => { introspection :: Boolean } -> Record q -> GraphQL ctx errs qGql

#mkGraphQLWithMutations Source

mkGraphQLWithMutations :: forall ctx errs q m qGql mGql. GqlSchema ctx errs (Record q) qGql => GqlSchema ctx errs (Record m) mGql => Record q -> Record m -> GraphQL ctx errs qGql

#mkGraphQLWithSubscriptions Source

mkGraphQLWithSubscriptions :: forall ctx errs q s qGql sGql. GqlSchema ctx errs (Record q) qGql => GqlSchema ctx errs (Record s) sGql => Record q -> Record s -> GraphQL ctx errs qGql

#mkGraphQLFull Source

mkGraphQLFull :: forall ctx errs q m s qGql mGql sGql. GqlSchema ctx errs (Record q) qGql => GqlSchema ctx errs (Record m) mGql => GqlSchema ctx errs (Record s) sGql => Record q -> Record m -> Record s -> GraphQL ctx errs qGql

#withMutations Source

withMutations :: forall @m ctx errs mGql gql. GqlSchema ctx errs (Record m) mGql => GraphQL ctx errs gql -> Record m -> GraphQL ctx errs gql

#withSubscriptions Source

withSubscriptions :: forall @s ctx errs sGql gql. GqlSchema ctx errs (Record s) sGql => GraphQL ctx errs gql -> Record s -> GraphQL ctx errs gql

#stripIntrospection Source

stripIntrospection :: forall ctx errs gql. GraphQL ctx errs gql -> GraphQL ctx errs gql

#executeQuery Source

executeQuery :: forall ctx errs schemaGql. GraphQL ctx errs schemaGql -> Array Selection -> Om ctx errs ResponseValue

#ParsedOperation Source

type ParsedOperation = { operationType :: OperationType, selections :: Array Selection }

#executeOperation Source

executeOperation :: forall ctx errs schemaGql. GraphQL ctx errs schemaGql -> ParsedOperation -> Om ctx errs ResponseValue

#executeOperationWith Source

executeOperationWith :: forall ctx errs schemaGql. Array (FieldWrapperFn ctx errs) -> GraphQL ctx errs schemaGql -> ParsedOperation -> Om ctx errs ResponseValue

#renameStep Source

renameStep :: forall ctx errs. String -> Step ctx errs -> Step ctx errs

#withFederation Source

withFederation :: forall ctx errs gql. EntityResolvers ctx errs -> GraphQL ctx errs gql -> GraphQL ctx errs gql