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

Hasura.RQL.Types.Allowlist

Synopsis

Documentation

data AllowlistScope Source #

Instances

Instances details
Eq AllowlistScope Source # 
Instance details

Defined in Hasura.RQL.Types.Allowlist

Show AllowlistScope Source # 
Instance details

Defined in Hasura.RQL.Types.Allowlist

Generic AllowlistScope Source # 
Instance details

Defined in Hasura.RQL.Types.Allowlist

Associated Types

type Rep AllowlistScope :: Type -> Type #

FromJSON AllowlistScope Source # 
Instance details

Defined in Hasura.RQL.Types.Allowlist

Methods

parseJSON :: Value -> Parser AllowlistScope

parseJSONList :: Value -> Parser [AllowlistScope]

ToJSON AllowlistScope Source # 
Instance details

Defined in Hasura.RQL.Types.Allowlist

Methods

toJSON :: AllowlistScope -> Value

toEncoding :: AllowlistScope -> Encoding

toJSONList :: [AllowlistScope] -> Value

toEncodingList :: [AllowlistScope] -> Encoding

type Rep AllowlistScope Source # 
Instance details

Defined in Hasura.RQL.Types.Allowlist

type Rep AllowlistScope = D1 ('MetaData "AllowlistScope" "Hasura.RQL.Types.Allowlist" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "AllowlistScopeGlobal" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AllowlistScopeRoles" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (NonEmpty RoleName))))

data AllowlistEntry Source #

Instances

Instances details
Eq AllowlistEntry Source # 
Instance details

Defined in Hasura.RQL.Types.Allowlist

Show AllowlistEntry Source # 
Instance details

Defined in Hasura.RQL.Types.Allowlist

Generic AllowlistEntry Source # 
Instance details

Defined in Hasura.RQL.Types.Allowlist

Associated Types

type Rep AllowlistEntry :: Type -> Type #

FromJSON AllowlistEntry Source # 
Instance details

Defined in Hasura.RQL.Types.Allowlist

Methods

parseJSON :: Value -> Parser AllowlistEntry

parseJSONList :: Value -> Parser [AllowlistEntry]

ToJSON AllowlistEntry Source # 
Instance details

Defined in Hasura.RQL.Types.Allowlist

Methods

toJSON :: AllowlistEntry -> Value

toEncoding :: AllowlistEntry -> Encoding

toJSONList :: [AllowlistEntry] -> Value

toEncodingList :: [AllowlistEntry] -> Encoding

type Rep AllowlistEntry Source # 
Instance details

Defined in Hasura.RQL.Types.Allowlist

type Rep AllowlistEntry = D1 ('MetaData "AllowlistEntry" "Hasura.RQL.Types.Allowlist" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "AllowlistEntry" 'PrefixI 'True) (S1 ('MetaSel ('Just "aeCollection") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CollectionName) :*: S1 ('MetaSel ('Just "aeScope") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 AllowlistScope)))

newtype UpdateScopeOfCollectionInAllowlist Source #

Wrap AllowlistEntry with a FromJSON instance that requires scope to be set.

Instances

Instances details
FromJSON UpdateScopeOfCollectionInAllowlist Source # 
Instance details

Defined in Hasura.RQL.Types.Allowlist

metadataAllowlistAllCollections :: MetadataAllowlist -> [CollectionName] Source #

Produce a list of all collections in the allowlist. This is used in runDropCollection to function to ensure that we don't delete any collections which are referred to in the allowlist.

newtype NormalizedQuery Source #

A query stripped of typenames. A query is allowed if it occurs in an allowed query collection after normalization.

Compare docsgraphqlcoredeploymentallow-list.rst.

Constructors

NormalizedQuery 

Fields

normalizeQuery :: ExecutableDocument Name -> NormalizedQuery Source #

Normalize query for comparison by stripping type names.

data InlinedAllowlist Source #

InlinedAllowlist is the data type with which the allowlist is represented in the schema cache, it contains a global and a per role allowlist and when allowlist is enabled in the graphql-engine, the incoming query for a non-admin role should either be in the global allowlist or in the given role's role based allowlist.

Essentially, it's a memoization of allowlistAllowsQuery implemented in terms of MetadataAllowlist.

Constructors

InlinedAllowlist 

Fields

data AllowlistMode Source #

The mode in which the allowlist functions. In global mode, collections with non-global scope are ignored.