Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type RemoteSchemaRelationshipsG remoteFieldInfo = InsOrdHashMap Name (InsOrdHashMap RelName remoteFieldInfo)
- data IntrospectionResult = IntrospectionResult {}
- data RemoteSchemaCtxG remoteFieldInfo = RemoteSchemaCtx {}
- data PartiallyResolvedRemoteRelationship remoteRelationshipDefinition = PartiallyResolvedRemoteRelationship {
- _prrrTypeName :: Name
- _prrrDefinition :: RemoteRelationshipG remoteRelationshipDefinition
- type PartiallyResolvedRemoteSchemaCtxG remoteRelationshipDefinition = RemoteSchemaCtxG (PartiallyResolvedRemoteRelationship remoteRelationshipDefinition)
- data ValidatedRemoteSchemaDef = ValidatedRemoteSchemaDef {}
- data RemoteSchemaCustomizer = RemoteSchemaCustomizer {}
- identityCustomizer :: RemoteSchemaCustomizer
- remoteSchemaCustomizeTypeName :: RemoteSchemaCustomizer -> MkTypename
- newtype CustomizeRemoteFieldName = CustomizeRemoteFieldName {
- runCustomizeRemoteFieldName :: Name -> Name -> Name
- withRemoteFieldNameCustomization :: forall m r a. (MonadReader r m, Has CustomizeRemoteFieldName r) => CustomizeRemoteFieldName -> m a -> m a
- remoteSchemaCustomizeFieldName :: RemoteSchemaCustomizer -> CustomizeRemoteFieldName
- hasTypeOrFieldCustomizations :: RemoteSchemaCustomizer -> Bool
- data RemoteSchemaInfo = RemoteSchemaInfo {}
- validateRemoteSchemaCustomization :: MonadError QErr m => Maybe RemoteSchemaCustomization -> m ()
- validateRemoteSchemaDef :: MonadError QErr m => Environment -> RemoteSchemaDef -> m ValidatedRemoteSchemaDef
- data SessionArgumentPresetInfo
- data RemoteSchemaVariable
- data RemoteSchemaInputValueDefinition = RemoteSchemaInputValueDefinition {}
- newtype RemoteSchemaIntrospection = RemoteSchemaIntrospection (HashMap Name (TypeDefinition [Name] RemoteSchemaInputValueDefinition))
- getTypeName :: TypeDefinition possibleTypes inputType -> Name
- lookupType :: RemoteSchemaIntrospection -> Name -> Maybe (TypeDefinition [Name] RemoteSchemaInputValueDefinition)
- lookupObject :: RemoteSchemaIntrospection -> Name -> Maybe (ObjectTypeDefinition RemoteSchemaInputValueDefinition)
- lookupInterface :: RemoteSchemaIntrospection -> Name -> Maybe (InterfaceTypeDefinition [Name] RemoteSchemaInputValueDefinition)
- lookupScalar :: RemoteSchemaIntrospection -> Name -> Maybe ScalarTypeDefinition
- lookupUnion :: RemoteSchemaIntrospection -> Name -> Maybe UnionTypeDefinition
- lookupEnum :: RemoteSchemaIntrospection -> Name -> Maybe EnumTypeDefinition
- lookupInputObject :: RemoteSchemaIntrospection -> Name -> Maybe (InputObjectTypeDefinition RemoteSchemaInputValueDefinition)
- newtype LHSIdentifier = LHSIdentifier {}
- remoteSchemaToLHSIdentifier :: RemoteSchemaName -> LHSIdentifier
- lhsIdentifierToGraphQLName :: LHSIdentifier -> Maybe Name
- data RemoteSchemaFieldInfo = RemoteSchemaFieldInfo {
- _rrfiName :: RelName
- _rrfiParamMap :: HashMap Name RemoteSchemaInputValueDefinition
- _rrfiRemoteFields :: RemoteFields
- _rrfiRemoteSchema :: RemoteSchemaInfo
- _rrfiInputValueDefinitions :: [TypeDefinition [Name] RemoteSchemaInputValueDefinition]
- _rrfiRemoteSchemaName :: RemoteSchemaName
- _rrfiLHSIdentifier :: LHSIdentifier
- graphQLValueToJSON :: Value Void -> Value
- rscRemoteRelationships :: forall remoteFieldInfo remoteFieldInfo. Lens (RemoteSchemaCtxG remoteFieldInfo) (RemoteSchemaCtxG remoteFieldInfo) (RemoteSchemaRelationshipsG remoteFieldInfo) (RemoteSchemaRelationshipsG remoteFieldInfo)
- rscRawIntrospectionResult :: forall remoteFieldInfo. Lens' (RemoteSchemaCtxG remoteFieldInfo) ByteString
- rscPermissions :: forall remoteFieldInfo. Lens' (RemoteSchemaCtxG remoteFieldInfo) (HashMap RoleName IntrospectionResult)
- rscName :: forall remoteFieldInfo. Lens' (RemoteSchemaCtxG remoteFieldInfo) RemoteSchemaName
- rscIntroOriginal :: forall remoteFieldInfo. Lens' (RemoteSchemaCtxG remoteFieldInfo) IntrospectionResult
- rscInfo :: forall remoteFieldInfo. Lens' (RemoteSchemaCtxG remoteFieldInfo) RemoteSchemaInfo
Documentation
type RemoteSchemaRelationshipsG remoteFieldInfo = InsOrdHashMap Name (InsOrdHashMap RelName remoteFieldInfo) Source #
data IntrospectionResult Source #
Instances
data RemoteSchemaCtxG remoteFieldInfo Source #
The resolved information of a remote schema. It is parameterized by
remoteFieldInfo
so as to work on an arbitrary 'remote relationship'
TODO: Get rid of this G
suffix using pattern synonyms or qualified
usage
RemoteSchemaCtx | |
|
Instances
data PartiallyResolvedRemoteRelationship remoteRelationshipDefinition Source #
Resolved information of a remote relationship with the local information that we have. Currently this is only the typename on which the relationship is defined. TODO: also add the available join fields on the type
PartiallyResolvedRemoteRelationship | |
|
Instances
type PartiallyResolvedRemoteSchemaCtxG remoteRelationshipDefinition = RemoteSchemaCtxG (PartiallyResolvedRemoteRelationship remoteRelationshipDefinition) Source #
We can't go from RemoteSchemaMetadata to RemoteSchemaCtx in a single phase because we don't have information to resolve remote relationships. So we annotate remote relationships with as much information as we know about them which would be further resolved in a later stage.
data ValidatedRemoteSchemaDef Source #
RemoteSchemaDef
after validation and baking-in of defaults in validateRemoteSchemaDef
.
Instances
data RemoteSchemaCustomizer Source #
RemoteSchemaCustomizer | |
|
Instances
newtype CustomizeRemoteFieldName Source #
withRemoteFieldNameCustomization :: forall m r a. (MonadReader r m, Has CustomizeRemoteFieldName r) => CustomizeRemoteFieldName -> m a -> m a Source #
data RemoteSchemaInfo Source #
RemoteSchemaDef
after the RemoteSchemaCustomizer has been generated
by fetchRemoteSchema
Instances
validateRemoteSchemaCustomization :: MonadError QErr m => Maybe RemoteSchemaCustomization -> m () Source #
validateRemoteSchemaDef :: MonadError QErr m => Environment -> RemoteSchemaDef -> m ValidatedRemoteSchemaDef Source #
data SessionArgumentPresetInfo Source #
See resolveRemoteVariable
function. This data type is used
for validation of the session variable value
Instances
data RemoteSchemaVariable Source #
Details required to resolve a "session variable preset" variable.
See Notes [Remote Schema Argument Presets] and [Remote Schema Permissions Architecture] for additional information.
SessionPresetVariable SessionVariable Name SessionArgumentPresetInfo | |
QueryVariable Variable | |
RemoteJSONValue GType Value |
Instances
data RemoteSchemaInputValueDefinition Source #
Extends InputValueDefinition
with an optional preset argument.
See Note [Remote Schema Argument Presets] for additional information.
Instances
newtype RemoteSchemaIntrospection Source #
Instances
getTypeName :: TypeDefinition possibleTypes inputType -> Name Source #
Extracts the name of a given type from its definition. TODO: move this to Language.GraphQL.Draft.Syntax.
lookupType :: RemoteSchemaIntrospection -> Name -> Maybe (TypeDefinition [Name] RemoteSchemaInputValueDefinition) Source #
lookupObject :: RemoteSchemaIntrospection -> Name -> Maybe (ObjectTypeDefinition RemoteSchemaInputValueDefinition) Source #
lookupInterface :: RemoteSchemaIntrospection -> Name -> Maybe (InterfaceTypeDefinition [Name] RemoteSchemaInputValueDefinition) Source #
lookupInputObject :: RemoteSchemaIntrospection -> Name -> Maybe (InputObjectTypeDefinition RemoteSchemaInputValueDefinition) Source #
newtype LHSIdentifier Source #
Instances
Generic LHSIdentifier Source # | |
Defined in Hasura.RemoteSchema.SchemaCache.Types type Rep LHSIdentifier :: Type -> Type # from :: LHSIdentifier -> Rep LHSIdentifier x # to :: Rep LHSIdentifier x -> LHSIdentifier # | |
Show LHSIdentifier Source # | |
Defined in Hasura.RemoteSchema.SchemaCache.Types showsPrec :: Int -> LHSIdentifier -> ShowS # show :: LHSIdentifier -> String # showList :: [LHSIdentifier] -> ShowS # | |
Eq LHSIdentifier Source # | |
Defined in Hasura.RemoteSchema.SchemaCache.Types (==) :: LHSIdentifier -> LHSIdentifier -> Bool # (/=) :: LHSIdentifier -> LHSIdentifier -> Bool # | |
type Rep LHSIdentifier Source # | |
Defined in Hasura.RemoteSchema.SchemaCache.Types type Rep LHSIdentifier = D1 ('MetaData "LHSIdentifier" "Hasura.RemoteSchema.SchemaCache.Types" "graphql-engine-1.0.0-inplace" 'True) (C1 ('MetaCons "LHSIdentifier" 'PrefixI 'True) (S1 ('MetaSel ('Just "getLHSIdentifier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) |
lhsIdentifierToGraphQLName :: LHSIdentifier -> Maybe Name Source #
Generates a valid graphql name from an arbitrary LHS identifier.
This is done by replacing all unrecognized characters by '_'. This
function still returns a Maybe
value, in cases we can't adjust
the raw text (such as the case of empty identifiers).
data RemoteSchemaFieldInfo Source #
Schema cache information for a table field targeting a remote schema.
RemoteSchemaFieldInfo | |
|
Instances
rscRemoteRelationships :: forall remoteFieldInfo remoteFieldInfo. Lens (RemoteSchemaCtxG remoteFieldInfo) (RemoteSchemaCtxG remoteFieldInfo) (RemoteSchemaRelationshipsG remoteFieldInfo) (RemoteSchemaRelationshipsG remoteFieldInfo) Source #
rscRawIntrospectionResult :: forall remoteFieldInfo. Lens' (RemoteSchemaCtxG remoteFieldInfo) ByteString Source #
rscPermissions :: forall remoteFieldInfo. Lens' (RemoteSchemaCtxG remoteFieldInfo) (HashMap RoleName IntrospectionResult) Source #
rscName :: forall remoteFieldInfo. Lens' (RemoteSchemaCtxG remoteFieldInfo) RemoteSchemaName Source #
rscIntroOriginal :: forall remoteFieldInfo. Lens' (RemoteSchemaCtxG remoteFieldInfo) IntrospectionResult Source #
rscInfo :: forall remoteFieldInfo. Lens' (RemoteSchemaCtxG remoteFieldInfo) RemoteSchemaInfo Source #