Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Hasura.RQL.Types.Allowlist
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 #
Constructors
DropCollectionFromAllowlist | |
Fields |
Instances
data AllowlistScope Source #
Constructors
AllowlistScopeGlobal | |
AllowlistScopeRoles (NonEmpty RoleName) |
Instances
data AllowlistEntry Source #
Constructors
AllowlistEntry | |
Fields |
Instances
newtype UpdateScopeOfCollectionInAllowlist Source #
Wrap AllowlistEntry
with a FromJSON instance that requires scope
to be set.
Constructors
UpdateScopeOfCollectionInAllowlist AllowlistEntry |
Instances
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.
Constructors
NormalizedQuery | |
Fields |
Instances
ToJSON NormalizedQuery Source # | |
Defined in Hasura.RQL.Types.Allowlist Methods 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 Methods showsPrec :: Int -> NormalizedQuery -> ShowS # show :: NormalizedQuery -> String # showList :: [NormalizedQuery] -> ShowS # | |
Eq NormalizedQuery Source # | |
Defined in Hasura.RQL.Types.Allowlist Methods (==) :: NormalizedQuery -> NormalizedQuery -> Bool # (/=) :: NormalizedQuery -> NormalizedQuery -> Bool # | |
Hashable NormalizedQuery Source # | |
Defined in Hasura.RQL.Types.Allowlist Methods 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
.
Constructors
InlinedAllowlist | |
Fields |
Instances
data AllowlistMode Source #
The mode in which the allowlist functions. In global mode, collections with non-global scope are ignored.
Constructors
AllowlistModeGlobalOnly | |
AllowlistModeFull |
allowlistAllowsQuery :: InlinedAllowlist -> AllowlistMode -> RoleName -> ExecutableDocument Name -> Bool Source #