Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype DropCollectionFromAllowlist = DropCollectionFromAllowlist {}
- data AllowlistScope
- data AllowlistEntry = AllowlistEntry {}
- newtype UpdateScopeOfCollectionInAllowlist = UpdateScopeOfCollectionInAllowlist AllowlistEntry
- type MetadataAllowlist = InsOrdHashMap CollectionName AllowlistEntry
- metadataAllowlistInsert :: AllowlistEntry -> MetadataAllowlist -> Either Text MetadataAllowlist
- metadataAllowlistUpdateScope :: AllowlistEntry -> MetadataAllowlist -> Either Text MetadataAllowlist
- metadataAllowlistAllCollections :: MetadataAllowlist -> [CollectionName]
- newtype NormalizedQuery = NormalizedQuery {}
- data InlinedAllowlist = InlinedAllowlist {}
- inlineAllowlist :: QueryCollections -> MetadataAllowlist -> InlinedAllowlist
- data AllowlistMode
- allowlistAllowsQuery :: InlinedAllowlist -> AllowlistMode -> RoleName -> ExecutableDocument Name -> Bool
Documentation
newtype DropCollectionFromAllowlist Source #
Instances
FromJSON DropCollectionFromAllowlist Source # | |
Defined in Hasura.RQL.Types.Allowlist | |
ToJSON DropCollectionFromAllowlist Source # | |
Generic DropCollectionFromAllowlist Source # | |
Defined in Hasura.RQL.Types.Allowlist type Rep DropCollectionFromAllowlist :: Type -> Type # | |
Show DropCollectionFromAllowlist Source # | |
Defined in Hasura.RQL.Types.Allowlist showsPrec :: Int -> DropCollectionFromAllowlist -> ShowS # show :: DropCollectionFromAllowlist -> String # showList :: [DropCollectionFromAllowlist] -> ShowS # | |
Eq DropCollectionFromAllowlist Source # | |
Defined in Hasura.RQL.Types.Allowlist | |
type Rep DropCollectionFromAllowlist Source # | |
Defined in Hasura.RQL.Types.Allowlist type Rep DropCollectionFromAllowlist = D1 ('MetaData "DropCollectionFromAllowlist" "Hasura.RQL.Types.Allowlist" "graphql-engine-1.0.0-inplace" 'True) (C1 ('MetaCons "DropCollectionFromAllowlist" 'PrefixI 'True) (S1 ('MetaSel ('Just "_dcfaCollection") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CollectionName))) |
data AllowlistScope Source #
Instances
data AllowlistEntry Source #
Instances
newtype UpdateScopeOfCollectionInAllowlist Source #
Wrap AllowlistEntry
with a FromJSON instance that requires scope
to be set.
metadataAllowlistInsert :: AllowlistEntry -> MetadataAllowlist -> Either Text MetadataAllowlist Source #
metadataAllowlistUpdateScope :: AllowlistEntry -> MetadataAllowlist -> Either Text MetadataAllowlist Source #
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.
Instances
ToJSON NormalizedQuery Source # | |
Defined in Hasura.RQL.Types.Allowlist toJSON :: NormalizedQuery -> Value Source # toEncoding :: NormalizedQuery -> Encoding Source # toJSONList :: [NormalizedQuery] -> Value Source # toEncodingList :: [NormalizedQuery] -> Encoding Source # | |
Show NormalizedQuery Source # | |
Defined in Hasura.RQL.Types.Allowlist showsPrec :: Int -> NormalizedQuery -> ShowS # show :: NormalizedQuery -> String # showList :: [NormalizedQuery] -> ShowS # | |
Eq NormalizedQuery Source # | |
Defined in Hasura.RQL.Types.Allowlist (==) :: NormalizedQuery -> NormalizedQuery -> Bool # (/=) :: NormalizedQuery -> NormalizedQuery -> Bool # | |
Hashable NormalizedQuery Source # | |
Defined in Hasura.RQL.Types.Allowlist hashWithSalt :: Int -> NormalizedQuery -> Int Source # hash :: NormalizedQuery -> Int Source # |
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
.
Instances
data AllowlistMode Source #
The mode in which the allowlist functions. In global mode, collections with non-global scope are ignored.
allowlistAllowsQuery :: InlinedAllowlist -> AllowlistMode -> RoleName -> ExecutableDocument Name -> Bool Source #