Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data ExecutionCtx = ExecutionCtx {}
- makeGQLContext :: UserInfo -> SchemaCache -> GraphQLQueryType -> GQLContext
- data ResolvedExecutionPlan
- newtype MultiplexedSubscriptionQueryPlan (b :: BackendType) = MultiplexedSubscriptionQueryPlan (SubscriptionQueryPlan b (MultiplexedQuery b))
- newtype SubscriptionQueryPlan = SubscriptionQueryPlan (AnyBackend MultiplexedSubscriptionQueryPlan)
- data SourceSubscription
- = SSLivequery !(HashSet ActionId) !(ActionLogResponseMap -> ExceptT QErr IO (SourceName, SubscriptionQueryPlan))
- | SSStreaming !RootFieldAlias !(SourceName, SubscriptionQueryPlan)
- data SubscriptionExecution
- buildSubscriptionPlan :: forall m. (MonadError QErr m, MonadQueryTags m, MonadIO m, MonadBaseControl IO m) => UserInfo -> RootFieldMap (QueryRootField UnpreparedValue) -> ParameterizedQueryHash -> m SubscriptionExecution
- checkQueryInAllowlist :: MonadError QErr m => Bool -> AllowlistMode -> UserInfo -> GQLReqParsed -> SchemaCache -> m ()
- getResolvedExecPlan :: forall m. (MonadError QErr m, MonadMetadataStorage (MetadataStorageT m), MonadIO m, MonadBaseControl IO m, MonadTrace m, MonadGQLExecutionCheck m, MonadQueryTags m) => Environment -> Logger Hasura -> UserInfo -> SQLGenCtx -> ReadOnlyMode -> SchemaCache -> SchemaCacheVer -> GraphQLQueryType -> Manager -> [Header] -> GQLReqUnparsed -> SingleOperation -> Maybe Name -> RequestId -> m (ParameterizedQueryHash, ResolvedExecutionPlan)
- isSingleNamespace :: RootFieldMap a -> Bool
Documentation
data ExecutionCtx Source #
Execution context
makeGQLContext :: UserInfo -> SchemaCache -> GraphQLQueryType -> GQLContext Source #
Construct a single step of an execution plan.
data ResolvedExecutionPlan Source #
QueryExecutionPlan ExecutionPlan [QueryRootField UnpreparedValue] DirectiveMap | query execution; remote schemas and introspection possible |
MutationExecutionPlan ExecutionPlan | mutation execution; only __typename introspection supported |
SubscriptionExecutionPlan SubscriptionExecution | either action query or live query execution; remote schemas and introspection not supported |
newtype MultiplexedSubscriptionQueryPlan (b :: BackendType) Source #
newtype SubscriptionQueryPlan Source #
data SourceSubscription Source #
SSLivequery !(HashSet ActionId) !(ActionLogResponseMap -> ExceptT QErr IO (SourceName, SubscriptionQueryPlan)) | |
SSStreaming !RootFieldAlias !(SourceName, SubscriptionQueryPlan) |
data SubscriptionExecution Source #
The comprehensive subscription plan. We only support either 1. Fields with only async action queries with no associated relationships or 2. Source database query fields from same source and also can be mixed with async action query fields whose relationships are defined to tables in the source
buildSubscriptionPlan :: forall m. (MonadError QErr m, MonadQueryTags m, MonadIO m, MonadBaseControl IO m) => UserInfo -> RootFieldMap (QueryRootField UnpreparedValue) -> ParameterizedQueryHash -> m SubscriptionExecution Source #
checkQueryInAllowlist :: MonadError QErr m => Bool -> AllowlistMode -> UserInfo -> GQLReqParsed -> SchemaCache -> m () Source #
getResolvedExecPlan :: forall m. (MonadError QErr m, MonadMetadataStorage (MetadataStorageT m), MonadIO m, MonadBaseControl IO m, MonadTrace m, MonadGQLExecutionCheck m, MonadQueryTags m) => Environment -> Logger Hasura -> UserInfo -> SQLGenCtx -> ReadOnlyMode -> SchemaCache -> SchemaCacheVer -> GraphQLQueryType -> Manager -> [Header] -> GQLReqUnparsed -> SingleOperation -> Maybe Name -> RequestId -> m (ParameterizedQueryHash, ResolvedExecutionPlan) Source #
Construct a ResolvedExecutionPlan
from a GQLReqParsed
and a
bunch of metadata.
isSingleNamespace :: RootFieldMap a -> Bool Source #
Even when directive _multiple_top_level_fields is given, we can't allow fields within differently-aliased namespaces. This is because the namespace is added to the result by wrapping the bytestring response we get back from the DB.