graphql-engine-1.0.0: GraphQL API over Postgres
Safe HaskellNone
LanguageHaskell2010

Hasura.GraphQL.Execute.Common

Synopsis

Documentation

class Monad m => MonadGQLExecutionCheck m where Source #

Typeclass representing safety checks (if any) that need to be performed before a GraphQL query should be allowed to be executed. In OSS, the safety check is to check in the query is in the allow list.

the executeIntrospection function has different implementations in OSS and Pro. In Pro, the GraphQL schema introspection can be disabled for specified roles and in OSS there is no restrictions.

| TODO (from master): Limitation: This parses the query, which is not ideal if we already have the query cached. The parsing happens unnecessary. But getting this to either return a plan or parse was tricky and complicated.

Methods

checkGQLExecution Source #

Arguments

:: UserInfo 
-> ([Header], IpAddress) 
-> Bool

allow list enabled?

-> SchemaCache

needs allow list

-> GQLReqUnparsed

the unparsed GraphQL query string (and related values)

-> RequestId 
-> m (Either QErr GQLReqParsed) 

executeIntrospection :: UserInfo -> Value -> SetGraphqlIntrospectionOptions -> m (Either QErr ExecutionStep) Source #

Instances

Instances details
MonadGQLExecutionCheck m => MonadGQLExecutionCheck (TraceT m) Source # 
Instance details

Defined in Hasura.GraphQL.Execute.Common

MonadGQLExecutionCheck m => MonadGQLExecutionCheck (MetadataStorageT m) Source # 
Instance details

Defined in Hasura.GraphQL.Execute.Common

Monad m => MonadGQLExecutionCheck (PGMetadataStorageAppT m) Source # 
Instance details

Defined in Hasura.App

MonadGQLExecutionCheck m => MonadGQLExecutionCheck (ExceptT e m) Source # 
Instance details

Defined in Hasura.GraphQL.Execute.Common

MonadGQLExecutionCheck m => MonadGQLExecutionCheck (ReaderT r m) Source # 
Instance details

Defined in Hasura.GraphQL.Execute.Common