Module
Prospero.RootResolver
- Package
- purescript-prospero
- Repository
- rowtype-yoga/purescript-prospero
#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
ImplType ctx errs Nil ()(ImplType ctx errs tail tailImpl, Cons name (Record args -> Om ctx errs result) tailImpl implRow, Lacks name tailImpl) => ImplType ctx errs (Cons name (Query (Record args) result) tail) implRow(ImplType ctx errs tail tailImpl, Cons name (Om ctx errs ty) tailImpl implRow, Lacks name tailImpl) => ImplType ctx errs (Cons name (Query Unit ty) tail) implRow(ImplType ctx errs (Cons name inner tail) implRow) => ImplType ctx errs (Cons name (Described desc inner) tail) implRow(ImplType ctx errs (Cons name inner tail) implRow) => ImplType ctx errs (Cons name (Cost cost inner) tail) implRow(ImplType ctx errs (Cons name inner tail) implRow) => ImplType ctx errs (Cons name (MaxAge n unit inner) tail) implRow(ImplType ctx errs (Cons name inner tail) implRow) => ImplType ctx errs (Cons name (Private inner) tail) implRow
#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
SplitSchema ctx errs Nil () () () ()(SplitSchema ctx errs tail tailImpl tailQ tailM tailS, Cons name (Record args -> Om ctx errs result) tailImpl implRow, Cons name (Record args -> Om ctx errs result) tailQ qRow, Lacks name tailImpl, Lacks name tailQ) => SplitSchema ctx errs (Cons name (Query (Record args) result) tail) implRow qRow tailM tailS(SplitSchema ctx errs tail tailImpl tailQ tailM tailS, Cons name (Om ctx errs ty) tailImpl implRow, Cons name (Om ctx errs ty) tailQ qRow, Lacks name tailImpl, Lacks name tailQ) => SplitSchema ctx errs (Cons name (Query Unit ty) tail) implRow qRow tailM tailS(SplitSchema ctx errs tail tailImpl tailQ tailM tailS, Cons name (Record args -> Om ctx errs result) tailImpl implRow, Cons name (Record args -> Om ctx errs result) tailM mRow, Lacks name tailImpl, Lacks name tailM) => SplitSchema ctx errs (Cons name (Mutation (Record args) result) tail) implRow tailQ mRow tailS(SplitSchema ctx errs tail tailImpl tailQ tailM tailS, Cons name (Om ctx errs ty) tailImpl implRow, Cons name (Om ctx errs ty) tailM mRow, Lacks name tailImpl, Lacks name tailM) => SplitSchema ctx errs (Cons name (Mutation Unit ty) tail) implRow tailQ mRow tailS(SplitSchema ctx errs tail tailImpl tailQ tailM tailS, Cons name (EventSource ty) tailImpl implRow, Cons name (EventSource ty) tailS sRow, Lacks name tailImpl, Lacks name tailS) => SplitSchema ctx errs (Cons name (Subscription ty) tail) implRow tailQ tailM sRow(SplitSchema ctx errs (Cons name inner tail) implRow qRow mRow sRow) => SplitSchema ctx errs (Cons name (Described desc inner) tail) implRow qRow mRow sRow(SplitSchema ctx errs (Cons name inner tail) implRow qRow mRow sRow) => SplitSchema ctx errs (Cons name (Cost cost inner) tail) implRow qRow mRow sRow(SplitSchema ctx errs (Cons name inner tail) implRow qRow mRow sRow) => SplitSchema ctx errs (Cons name (MaxAge n unit inner) tail) implRow qRow mRow sRow(SplitSchema ctx errs (Cons name inner tail) implRow qRow mRow sRow) => SplitSchema ctx errs (Cons name (Private inner) tail) implRow qRow mRow sRow
#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#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#withFederation Source
withFederation :: forall ctx errs gql. EntityResolvers ctx errs -> GraphQL ctx errs gql -> GraphQL ctx errs gql- Modules
- Dev.
Client - Dev.
Schema - Dev.
Server - Prospero
- Prospero.
Bun - Prospero.
CacheControl - Prospero.
Client - Prospero.
Client. GqlUnion - Prospero.
Client. WebSocket - Prospero.
Codegen - Prospero.
Codegen. Main - Prospero.
Crypto - Prospero.
DataLoader - Prospero.
Defer - Prospero.
Directive - Prospero.
Execution - Prospero.
Fastify - Prospero.
Federation - Prospero.
GqlQuery - Prospero.
GqlTypes - Prospero.
GraphQLError - Prospero.
GraphQLWS - Prospero.
Http - Prospero.
InputValue - Prospero.
Introspection - Prospero.
Metadata - Prospero.
Om - Prospero.
Parser - Prospero.
Parser. AST - Prospero.
Parser. GraphQL - Prospero.
Parser. Lexer - Prospero.
Parser. Monad - Prospero.
Parser. Token - Prospero.
PersistedQueries - Prospero.
Relay - Prospero.
ResponseValue - Prospero.
RootResolver - Prospero.
SDL - Prospero.
Scalars - Prospero.
Schema - Prospero.
SchemaTransform - Prospero.
Step - Prospero.
Subscription - Prospero.
Tracing - Prospero.
Types - Prospero.
Upload - Prospero.
Validation - Prospero.
VariantHelper - Prospero.
WebSocket - Prospero.
Wrapper