Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
The RQL query ('v1query')
Synopsis
- data RQLQuery
- runQuery :: (MonadIO m, MonadError QErr m, HasAppEnv m, HasCacheStaticConfig m, MonadTrace m, MonadBaseControl IO m, MonadMetadataStorage m, MonadResolveSource m, MonadQueryTags m, MonadEventLogCleanup m, ProvidesHasuraServices m, MonadGetPolicies m, UserInfoM m) => AppContext -> RebuildableSchemaCache -> RQLQuery -> m (EncJSON, RebuildableSchemaCache)
- queryModifiesSchemaCache :: RQLQuery -> Bool
- requiresAdmin :: RQLQuery -> Bool
Documentation
runQuery :: (MonadIO m, MonadError QErr m, HasAppEnv m, HasCacheStaticConfig m, MonadTrace m, MonadBaseControl IO m, MonadMetadataStorage m, MonadResolveSource m, MonadQueryTags m, MonadEventLogCleanup m, ProvidesHasuraServices m, MonadGetPolicies m, UserInfoM m) => AppContext -> RebuildableSchemaCache -> RQLQuery -> m (EncJSON, RebuildableSchemaCache) Source #
queryModifiesSchemaCache :: RQLQuery -> Bool Source #
A predicate that determines whether the given query might modify/rebuild the schema cache. If so, it needs to acquire the global lock on the schema cache so that other queries do not modify it concurrently.
Ideally, we would enforce this using the type system — queries for which this function returns
False
should not be allowed to modify the schema cache. But for now we just ensure consistency
by hand.
requiresAdmin :: RQLQuery -> Bool Source #