Module
Prospero.Schema
- Package
- purescript-prospero
- Repository
- rowtype-yoga/purescript-prospero
#GqlSchema Source
class GqlSchema :: Type -> Row Type -> Type -> Type -> Constraintclass GqlSchema ctx errs a gql | a -> gql where
Maps a PureScript type to its GraphQL type-level representation and runtime behavior.
The fundep a -> gql means the GraphQL schema shape is fully determined by the PureScript type.
Members
Instances
GqlSchema ctx errs String (GqlNonNull GqlString)GqlSchema ctx errs Int (GqlNonNull GqlInt)GqlSchema ctx errs Number (GqlNonNull GqlFloat)GqlSchema ctx errs Boolean (GqlNonNull GqlBoolean)GqlSchema ctx errs ID (GqlNonNull GqlID)(GqlSchema ctx errs a gql, StripNonNull gql inner) => GqlSchema ctx errs (Maybe a) (GqlNullable inner)(GqlSchema ctx errs a gql) => GqlSchema ctx errs (Array a) (GqlNonNull (GqlList gql))(GqlSchema ctx errs a gql) => GqlSchema ctx errs (Om ctx errs a) gql(GqlSchema ctx errs a gql) => GqlSchema ctx errs (EventSource a) gql(GqlSchema ctx errs a gql) => GqlSchema ctx errs (Edge a) (GqlNonNull (GqlObject "Edge" ()))(GqlSchema ctx errs a gql) => GqlSchema ctx errs (Connection a) (GqlNonNull (GqlObject "Connection" ()))(GqlSchema ctx errs a gql) => GqlSchema ctx errs (Described desc a) gql(GqlSchema ctx errs a gql) => GqlSchema ctx errs (Deprecated reason a) gql(GqlSchema ctx errs a gql) => GqlSchema ctx errs (Defaulted value a) gql(GqlSchema ctx errs a gql) => GqlSchema ctx errs (Cost cost a) gql(GqlSchema ctx errs a gql) => GqlSchema ctx errs (MaxAge n unit a) gql(GqlSchema ctx errs a gql) => GqlSchema ctx errs (Named gqlName a) gql(IsSymbol name, GqlSchema ctx errs a gql) => GqlSchema ctx errs (Name name a) gql(GqlSchema ctx errs a gql) => GqlSchema ctx errs (Excluded a) gql(GqlSchema ctx errs a gql) => GqlSchema ctx errs (Private a) gql(RowToList args argsRL, FromInputRecord argsRL args, GqlSchemaArgs ctx errs argsRL, GqlSchema ctx errs a gql, ToGqlArgs argsRL argsGql, Cons "wrongArgumentType" String errs_ errs) => GqlSchema ctx errs (Record args -> a) gql(RowToList r rl, GqlSchemaFields ctx errs rl r fieldsGql) => GqlSchema ctx errs (Record r) (GqlNonNull (GqlObject "Object" fieldsGql))(IsSymbol name, RowToList r rl, GqlSchemaFields ctx errs rl r fieldsGql) => GqlSchema ctx errs (GqlObject_ name (Record r)) (GqlNonNull (GqlObject name fieldsGql))(IsSymbol name, Newtype a (Record r), RowToList r rl, GqlSchemaFields ctx errs rl r fieldsGql) => GqlSchema ctx errs (GqlObject_ name a) (GqlNonNull (GqlObject name fieldsGql))(IsSymbol name, Generic a rep, GqlEnumValues rep, GqlEnumResolve rep) => GqlSchema ctx errs (GqlEnum_ name a) (GqlNonNull (GqlEnum name))(IsSymbol name, RowToList row rl, GqlVariantMembers ctx errs rl row) => GqlSchema ctx errs (GqlUnion_ name (Variant row)) (GqlNonNull (GqlUnion name ()))(IsSymbol name, Newtype a (Variant row), RowToList row rl, GqlVariantMembers ctx errs rl row) => GqlSchema ctx errs (GqlUnion_ name a) (GqlNonNull (GqlUnion name ()))(IsSymbol name, RowToList r rl, GqlSchemaArgs ctx errs rl) => GqlSchema ctx errs (GqlInputObject_ name (Record r)) (GqlNonNull (GqlInputObject name ()))(IsSymbol name, Newtype a (Record r), RowToList r rl, GqlSchemaArgs ctx errs rl) => GqlSchema ctx errs (GqlInputObject_ name a) (GqlNonNull (GqlInputObject name ()))(IsGql kind name a, IsSymbol name, GqlSchemaByKind ctx errs kind name a gql) => GqlSchema ctx errs a gql
#GqlSchemaFields Source
class GqlSchemaFields :: Type -> Row Type -> RowList Type -> Row Type -> Row Type -> Constraintclass GqlSchemaFields ctx errs rl r fieldsGql | rl -> fieldsGql where
Walks a record's RowList and produces both runtime GqlFields and a type-level row of field types.
Members
toGqlFields :: Proxy rl -> Array GqlFieldresolveFields :: Record r -> Proxy rl -> Map String (Step ctx errs)
Instances
GqlSchemaFields ctx errs Nil r ()(IsSymbol name, GqlSchema ctx errs ty gql, GqlFieldType ty gql fieldGql, GqlFieldArgs ctx errs ty, HasGqlDescription ty, HasGqlDeprecated ty, HasGqlCost ty, HasGqlCacheControl ty, HasGqlName ty, HasGqlExcluded ty, GqlSchemaFields ctx errs tail r tailFieldsGql, Cons name fieldGql tailFieldsGql fieldsGql, Lacks name tailFieldsGql, Cons name ty trash r) => GqlSchemaFields ctx errs (Cons name ty tail) r fieldsGql
#GqlSchemaArgs Source
class GqlSchemaArgs :: Type -> Row Type -> RowList Type -> Constraintclass GqlSchemaArgs ctx errs rl where
Members
toGqlInputValues :: Proxy rl -> Array GqlInputValue
Instances
GqlSchemaArgs ctx errs Nil(IsSymbol name, FromInputValue ty, GqlSchema ctx errs ty gql, HasGqlDefaultValue ty, GqlSchemaArgs ctx errs tail) => GqlSchemaArgs ctx errs (Cons name ty tail)
#GqlFieldArgs Source
class GqlFieldArgs :: Type -> Row Type -> Type -> Constraintclass GqlFieldArgs ctx errs a where
Produces the runtime argument list for a field type.
Members
toFieldArgs :: Proxy a -> Array GqlInputValue
Instances
(RowToList args argsRL, GqlSchemaArgs ctx errs argsRL) => GqlFieldArgs ctx errs (Record args -> Om ctx errs result)(RowToList args argsRL, GqlSchemaArgs ctx errs argsRL) => GqlFieldArgs ctx errs (Record args -> result)GqlFieldArgs ctx errs (Om ctx errs a)GqlFieldArgs ctx errs a
#GqlArgTypes Source
class GqlArgTypes a gql | a -> gqlMaps a PureScript argument type to its GraphQL input type.
Instances
GqlArgTypes String (GqlNonNull GqlString)GqlArgTypes Int (GqlNonNull GqlInt)GqlArgTypes Number (GqlNonNull GqlFloat)GqlArgTypes Boolean (GqlNonNull GqlBoolean)(GqlArgTypes a gql) => GqlArgTypes (Defaulted value a) gql(GqlArgTypes a gql) => GqlArgTypes (Maybe a) (GqlNullable gql)GqlArgTypes ID (GqlNonNull GqlID)(GqlArgTypes a gql) => GqlArgTypes (Array a) (GqlNonNull (GqlList gql))(IsSymbol name) => GqlArgTypes (GqlInputObject_ name a) (GqlNonNull (GqlInputObject name ()))(IsSymbol name) => GqlArgTypes (GqlEnum_ name a) (GqlNonNull (GqlEnum name))(IsGql kind name a, IsSymbol name, GqlArgTypesByKind kind name a gql) => GqlArgTypes a gql
#ToGqlArgs Source
#GqlFieldType Source
class GqlFieldType a gql fieldGql | a -> fieldGqlDetermines whether a field is plain or has arguments, producing the appropriate GqlField/GqlFieldWithArgs.
Instances
(RowToList args argsRL, ToGqlArgs argsRL argsGql) => GqlFieldType (Record args -> Om ctx errs result) gql (GqlFieldWithArgs argsGql gql)(RowToList args argsRL, ToGqlArgs argsRL argsGql) => GqlFieldType (Record args -> result) gql (GqlFieldWithArgs argsGql gql)GqlFieldType (Om ctx errs a) gql (GqlField gql)GqlFieldType a gql (GqlField gql)
#GqlEnumValues Source
class GqlEnumValues rep whereMembers
Instances
(IsSymbol name) => GqlEnumValues (Constructor name NoArguments)(GqlEnumValues a, GqlEnumValues b) => GqlEnumValues (Sum a b)
#GqlEnumResolve Source
class GqlEnumResolve rep whereMembers
enumToString :: rep -> StringenumFromString :: String -> Maybe rep
Instances
(IsSymbol name) => GqlEnumResolve (Constructor name NoArguments)(GqlEnumResolve a, GqlEnumResolve b) => GqlEnumResolve (Sum a b)
#genericFromInputValue Source
genericFromInputValue :: forall a rep. Generic a rep => GqlEnumResolve rep => InputValue -> Either InputError a#GqlVariantMembers Source
class GqlVariantMembers :: Type -> Row Type -> RowList Type -> Row Type -> Constraintclass GqlVariantMembers ctx errs rl row | rl -> row where
Members
variantMemberTypes :: Array GqlTyperesolveVariant :: Variant row -> Step ctx errs
Instances
GqlVariantMembers ctx errs Nil ()(IsSymbol label, GqlSchema ctx errs ty gql, Cons label ty r1 row, GqlVariantMembers ctx errs tail r1) => GqlVariantMembers ctx errs (Cons label ty tail) row
#GqlSchemaByKind Source
class GqlSchemaByKind :: Type -> Row Type -> Type -> Symbol -> Type -> Type -> Constraintclass GqlSchemaByKind ctx errs kind name a gql | kind a -> gql where
Dispatch GqlSchema behavior based on the GqlKind tag
Members
toGqlTypeByKind :: Proxy a -> GqlTyperesolveByKind :: a -> Step ctx errs
Instances
(IsSymbol name, Newtype a (Record r), RowToList r rl, GqlSchemaFields ctx errs rl r fieldsGql) => GqlSchemaByKind ctx errs Object name a (GqlNonNull (GqlObject "Object" fieldsGql))(IsSymbol name, Generic a rep, GqlEnumValues rep, GqlEnumResolve rep) => GqlSchemaByKind ctx errs Enum name a (GqlNonNull (GqlEnum "Enum"))(IsSymbol name, Newtype a (Variant row), RowToList row rl, GqlVariantMembers ctx errs rl row) => GqlSchemaByKind ctx errs Union name a (GqlNonNull (GqlUnion "Union" ()))(IsSymbol name, Newtype a (Record r), RowToList r rl, GqlSchemaFields ctx errs rl r fieldsGql) => GqlSchemaByKind ctx errs Interface name a (GqlNonNull (GqlInterface "Interface" fieldsGql))(IsSymbol name, Newtype a (Record r), RowToList r rl, GqlSchemaArgs ctx errs rl) => GqlSchemaByKind ctx errs InputObject name a (GqlNonNull (GqlInputObject name ()))(IsSymbol name, Newtype a inner, ScalarToResponseValue inner) => GqlSchemaByKind ctx errs Scalar name a (GqlNonNull (GqlCustomScalar "Scalar"))
#GqlArgTypesByKind Source
class GqlArgTypesByKind :: Type -> Symbol -> Type -> Type -> Constraintclass GqlArgTypesByKind kind name a gql | kind a -> gql
Instances
(IsSymbol name) => GqlArgTypesByKind InputObject name a (GqlNonNull (GqlInputObject name ()))(IsSymbol name) => GqlArgTypesByKind Enum name a (GqlNonNull (GqlEnum name))(IsSymbol name) => GqlArgTypesByKind Scalar name a (GqlNonNull (GqlCustomScalar name))
#ScalarToResponseValue Source
- 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