graphql-engine-1.0.0: GraphQL API over Postgres
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hasura.Backends.Postgres.Instances.Schema

Description

Postgres Instances Schema

Defines a BackendSchema type class instance for Postgres.

Orphan instances

(PostgresSchema pgKind, Backend ('Postgres pgKind)) => BackendLogicalModelSelectSchema ('Postgres pgKind) Source # 
Instance details

Methods

logicalModelArguments :: forall r (m :: Type -> Type) (n :: Type -> Type). MonadBuildSourceSchema ('Postgres pgKind) r m n => LogicalModelInfo ('Postgres pgKind) -> SchemaT r m (InputFieldsParser n (SelectArgsG ('Postgres pgKind) (UnpreparedValue ('Postgres pgKind)))) Source #

logicalModelSelectionSet :: forall r (m :: Type -> Type) (n :: Type -> Type). MonadBuildSourceSchema ('Postgres pgKind) r m n => LogicalModelInfo ('Postgres pgKind) -> SchemaT r m (Maybe (Parser 'Output n (AnnotatedFields ('Postgres pgKind)))) Source #

(PostgresSchema pgKind, Backend ('Postgres pgKind)) => BackendNativeQuerySelectSchema ('Postgres pgKind) Source # 
Instance details

(Backend ('Postgres pgKind), PostgresSchema pgKind) => BackendSchema ('Postgres pgKind) Source # 
Instance details

Methods

buildTableQueryAndSubscriptionFields :: forall r (m :: Type -> Type) (n :: Type -> Type). MonadBuildSchema ('Postgres pgKind) r m n => MkRootFieldName -> TableName ('Postgres pgKind) -> TableInfo ('Postgres pgKind) -> GQLNameIdentifier -> SchemaT r m ([FieldParser n (QueryDB ('Postgres pgKind) (RemoteRelationshipField UnpreparedValue) (UnpreparedValue ('Postgres pgKind)))], [FieldParser n (QueryDB ('Postgres pgKind) (RemoteRelationshipField UnpreparedValue) (UnpreparedValue ('Postgres pgKind)))], Maybe (Name, Parser 'Output n (ApolloFederationParserFunction n))) Source #

buildTableStreamingSubscriptionFields :: forall r (m :: Type -> Type) (n :: Type -> Type). MonadBuildSchema ('Postgres pgKind) r m n => MkRootFieldName -> TableName ('Postgres pgKind) -> TableInfo ('Postgres pgKind) -> GQLNameIdentifier -> SchemaT r m [FieldParser n (QueryDB ('Postgres pgKind) (RemoteRelationshipField UnpreparedValue) (UnpreparedValue ('Postgres pgKind)))] Source #

buildTableRelayQueryFields :: forall r (m :: Type -> Type) (n :: Type -> Type). MonadBuildSchema ('Postgres pgKind) r m n => MkRootFieldName -> TableName ('Postgres pgKind) -> TableInfo ('Postgres pgKind) -> GQLNameIdentifier -> NESeq (ColumnInfo ('Postgres pgKind)) -> SchemaT r m [FieldParser n (QueryDB ('Postgres pgKind) (RemoteRelationshipField UnpreparedValue) (UnpreparedValue ('Postgres pgKind)))] Source #

buildTableInsertMutationFields :: forall r (m :: Type -> Type) (n :: Type -> Type). MonadBuildSchema ('Postgres pgKind) r m n => MkRootFieldName -> Scenario -> TableName ('Postgres pgKind) -> TableInfo ('Postgres pgKind) -> GQLNameIdentifier -> SchemaT r m [FieldParser n (AnnotatedInsert ('Postgres pgKind) (RemoteRelationshipField UnpreparedValue) (UnpreparedValue ('Postgres pgKind)))] Source #

buildTableUpdateMutationFields :: forall r (m :: Type -> Type) (n :: Type -> Type). MonadBuildSchema ('Postgres pgKind) r m n => Scenario -> TableInfo ('Postgres pgKind) -> GQLNameIdentifier -> SchemaT r m [FieldParser n (AnnotatedUpdateG ('Postgres pgKind) (RemoteRelationshipField UnpreparedValue) (UnpreparedValue ('Postgres pgKind)))] Source #

buildTableDeleteMutationFields :: forall r (m :: Type -> Type) (n :: Type -> Type). MonadBuildSchema ('Postgres pgKind) r m n => MkRootFieldName -> Scenario -> TableName ('Postgres pgKind) -> TableInfo ('Postgres pgKind) -> GQLNameIdentifier -> SchemaT r m [FieldParser n (AnnDelG ('Postgres pgKind) (RemoteRelationshipField UnpreparedValue) (UnpreparedValue ('Postgres pgKind)))] Source #

buildFunctionQueryFields :: forall r (m :: Type -> Type) (n :: Type -> Type). MonadBuildSchema ('Postgres pgKind) r m n => MkRootFieldName -> FunctionName ('Postgres pgKind) -> FunctionInfo ('Postgres pgKind) -> TableName ('Postgres pgKind) -> SchemaT r m [FieldParser n (QueryDB ('Postgres pgKind) (RemoteRelationshipField UnpreparedValue) (UnpreparedValue ('Postgres pgKind)))] Source #

buildFunctionRelayQueryFields :: forall r (m :: Type -> Type) (n :: Type -> Type). MonadBuildSchema ('Postgres pgKind) r m n => MkRootFieldName -> FunctionName ('Postgres pgKind) -> FunctionInfo ('Postgres pgKind) -> TableName ('Postgres pgKind) -> NESeq (ColumnInfo ('Postgres pgKind)) -> SchemaT r m [FieldParser n (QueryDB ('Postgres pgKind) (RemoteRelationshipField UnpreparedValue) (UnpreparedValue ('Postgres pgKind)))] Source #

buildFunctionMutationFields :: forall r (m :: Type -> Type) (n :: Type -> Type). MonadBuildSchema ('Postgres pgKind) r m n => MkRootFieldName -> FunctionName ('Postgres pgKind) -> FunctionInfo ('Postgres pgKind) -> TableName ('Postgres pgKind) -> SchemaT r m [FieldParser n (MutationDB ('Postgres pgKind) (RemoteRelationshipField UnpreparedValue) (UnpreparedValue ('Postgres pgKind)))] Source #

buildNativeQueryRootFields :: forall r (m :: Type -> Type) (n :: Type -> Type). MonadBuildSchema ('Postgres pgKind) r m n => NativeQueryInfo ('Postgres pgKind) -> SchemaT r m (Maybe (FieldParser n (QueryDB ('Postgres pgKind) (RemoteRelationshipField UnpreparedValue) (UnpreparedValue ('Postgres pgKind))))) Source #

buildStoredProcedureRootFields :: forall r (m :: Type -> Type) (n :: Type -> Type). MonadBuildSchema ('Postgres pgKind) r m n => StoredProcedureInfo ('Postgres pgKind) -> SchemaT r m (Maybe (FieldParser n (QueryDB ('Postgres pgKind) (RemoteRelationshipField UnpreparedValue) (UnpreparedValue ('Postgres pgKind))))) Source #

mkRelationshipParser :: forall r (m :: Type -> Type) (n :: Type -> Type). MonadBuildSchema ('Postgres pgKind) r m n => RelInfo ('Postgres pgKind) -> SchemaT r m (Maybe (InputFieldsParser n (Maybe (AnnotatedInsertField ('Postgres pgKind) (UnpreparedValue ('Postgres pgKind)))))) Source #

relayExtension :: Maybe (XRelay ('Postgres pgKind)) Source #

nodesAggExtension :: Maybe (XNodesAgg ('Postgres pgKind)) Source #

streamSubscriptionExtension :: Maybe (XStreamingSubscription ('Postgres pgKind)) Source #

groupByExtension :: Maybe (XGroupBy ('Postgres pgKind)) Source #

columnParser :: forall r (m :: Type -> Type) (n :: Type -> Type). MonadBuildSchema ('Postgres pgKind) r m n => ColumnType ('Postgres pgKind) -> Nullability -> SchemaT r m (Parser 'Both n (ValueWithOrigin (ColumnValue ('Postgres pgKind)))) Source #

enumParser :: forall r (m :: Type -> Type) (n :: Type -> Type). MonadBuildSchema ('Postgres pgKind) r m n => TableName ('Postgres pgKind) -> NonEmpty (EnumValue, EnumValueInfo) -> Maybe Name -> Nullability -> SchemaT r m (Parser 'Both n (ScalarValue ('Postgres pgKind))) Source #

possiblyNullable :: forall (m :: Type -> Type). MonadParse m => ScalarType ('Postgres pgKind) -> Nullability -> Parser 'Both m (ScalarValue ('Postgres pgKind)) -> Parser 'Both m (ScalarValue ('Postgres pgKind)) Source #

scalarSelectionArgumentsParser :: forall (n :: Type -> Type). MonadParse n => ColumnType ('Postgres pgKind) -> InputFieldsParser n (Maybe (ScalarSelectionArguments ('Postgres pgKind))) Source #

orderByOperators :: SourceInfo ('Postgres pgKind) -> NamingCase -> (Name, NonEmpty (Definition EnumValueInfo, (BasicOrderType ('Postgres pgKind), NullsOrderType ('Postgres pgKind)))) Source #

comparisonExps :: forall r (m :: Type -> Type) (n :: Type -> Type). MonadBuildSchema ('Postgres pgKind) r m n => ColumnType ('Postgres pgKind) -> SchemaT r m (Parser 'Input n [ComparisonExp ('Postgres pgKind)]) Source #

countTypeInput :: forall (n :: Type -> Type). MonadParse n => Maybe (Parser 'Both n (Column ('Postgres pgKind), AnnRedactionExpUnpreparedValue ('Postgres pgKind))) -> InputFieldsParser n (CountDistinct -> CountType ('Postgres pgKind) (UnpreparedValue ('Postgres pgKind))) Source #

aggregateOrderByCountType :: ScalarType ('Postgres pgKind) Source #

computedField :: forall r (m :: Type -> Type) (n :: Type -> Type). MonadBuildSchema ('Postgres pgKind) r m n => ComputedFieldInfo ('Postgres pgKind) -> TableName ('Postgres pgKind) -> TableInfo ('Postgres pgKind) -> SchemaT r m (Maybe (FieldParser n (AnnotatedField ('Postgres pgKind)))) Source #

(PostgresSchema pgKind, Backend ('Postgres pgKind)) => BackendTableSelectSchema ('Postgres pgKind) Source # 
Instance details

Methods

tableArguments :: forall r (m :: Type -> Type) (n :: Type -> Type). MonadBuildSourceSchema ('Postgres pgKind) r m n => TableInfo ('Postgres pgKind) -> SchemaT r m (InputFieldsParser n (SelectArgsG ('Postgres pgKind) (UnpreparedValue ('Postgres pgKind)))) Source #

tableSelectionSet :: forall r (m :: Type -> Type) (n :: Type -> Type). MonadBuildSourceSchema ('Postgres pgKind) r m n => TableInfo ('Postgres pgKind) -> SchemaT r m (Maybe (Parser 'Output n (AnnotatedFields ('Postgres pgKind)))) Source #

selectTable :: forall r (m :: Type -> Type) (n :: Type -> Type). MonadBuildSourceSchema ('Postgres pgKind) r m n => TableInfo ('Postgres pgKind) -> Name -> Maybe Description -> SchemaT r m (Maybe (FieldParser n (SelectExp ('Postgres pgKind)))) Source #

selectTableAggregate :: forall r (m :: Type -> Type) (n :: Type -> Type). MonadBuildSourceSchema ('Postgres pgKind) r m n => TableInfo ('Postgres pgKind) -> Name -> Maybe Description -> SchemaT r m (Maybe (FieldParser n (AggSelectExp ('Postgres pgKind)))) Source #

Backend ('Postgres pgKind) => BackendUpdateOperatorsSchema ('Postgres pgKind) Source # 
Instance details

Associated Types

type UpdateOperators ('Postgres pgKind) :: Type -> Type Source #

Methods

parseUpdateOperators :: forall (m :: Type -> Type) (n :: Type -> Type) r. MonadBuildSchema ('Postgres pgKind) r m n => TableInfo ('Postgres pgKind) -> UpdPermInfo ('Postgres pgKind) -> SchemaT r m (InputFieldsParser n (HashMap (Column ('Postgres pgKind)) (UpdateOperators ('Postgres pgKind) (UnpreparedValue ('Postgres pgKind))))) Source #

BackendSchema ('Postgres pgKind) => AggregationPredicatesSchema ('Postgres pgKind) Source # 
Instance details

Methods

aggregationPredicatesParser :: forall r (m :: Type -> Type) (n :: Type -> Type). MonadBuildSourceSchema ('Postgres pgKind) r m n => TableInfo ('Postgres pgKind) -> SchemaT r m (Maybe (InputFieldsParser n [AggregationPredicates ('Postgres pgKind) (UnpreparedValue ('Postgres pgKind))])) Source #