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

Hasura.RQL.Types.Function

Synopsis

Documentation

data FunctionVolatility Source #

Instances

Instances details
Eq FunctionVolatility Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Show FunctionVolatility Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Generic FunctionVolatility Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Associated Types

type Rep FunctionVolatility :: Type -> Type #

NFData FunctionVolatility Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Methods

rnf :: FunctionVolatility -> () #

FromJSON FunctionVolatility Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Methods

parseJSON :: Value -> Parser FunctionVolatility

parseJSONList :: Value -> Parser [FunctionVolatility]

ToJSON FunctionVolatility Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Cacheable FunctionVolatility Source # 
Instance details

Defined in Hasura.RQL.Types.Function

type Rep FunctionVolatility Source # 
Instance details

Defined in Hasura.RQL.Types.Function

type Rep FunctionVolatility = D1 ('MetaData "FunctionVolatility" "Hasura.RQL.Types.Function" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "FTVOLATILE" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "FTIMMUTABLE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FTSTABLE" 'PrefixI 'False) (U1 :: Type -> Type)))

newtype FunctionArgName Source #

Constructors

FunctionArgName 

Fields

Instances

Instances details
Eq FunctionArgName Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Data FunctionArgName Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FunctionArgName -> c FunctionArgName #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FunctionArgName #

toConstr :: FunctionArgName -> Constr #

dataTypeOf :: FunctionArgName -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FunctionArgName) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FunctionArgName) #

gmapT :: (forall b. Data b => b -> b) -> FunctionArgName -> FunctionArgName #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FunctionArgName -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FunctionArgName -> r #

gmapQ :: (forall d. Data d => d -> u) -> FunctionArgName -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> FunctionArgName -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> FunctionArgName -> m FunctionArgName #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FunctionArgName -> m FunctionArgName #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FunctionArgName -> m FunctionArgName #

Ord FunctionArgName Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Show FunctionArgName Source # 
Instance details

Defined in Hasura.RQL.Types.Function

IsString FunctionArgName Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Generic FunctionArgName Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Associated Types

type Rep FunctionArgName :: Type -> Type #

NFData FunctionArgName Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Methods

rnf :: FunctionArgName -> () #

Hashable FunctionArgName Source # 
Instance details

Defined in Hasura.RQL.Types.Function

FromJSONKey FunctionArgName Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Methods

fromJSONKey :: FromJSONKeyFunction FunctionArgName

fromJSONKeyList :: FromJSONKeyFunction [FunctionArgName]

FromJSON FunctionArgName Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Methods

parseJSON :: Value -> Parser FunctionArgName

parseJSONList :: Value -> Parser [FunctionArgName]

ToJSONKey FunctionArgName Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Methods

toJSONKey :: ToJSONKeyFunction FunctionArgName

toJSONKeyList :: ToJSONKeyFunction [FunctionArgName]

ToJSON FunctionArgName Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Methods

toJSON :: FunctionArgName -> Value

toEncoding :: FunctionArgName -> Encoding

toJSONList :: [FunctionArgName] -> Value

toEncodingList :: [FunctionArgName] -> Encoding

ToTxt FunctionArgName Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Methods

toTxt :: FunctionArgName -> Text Source #

Cacheable FunctionArgName Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Lift FunctionArgName Source # 
Instance details

Defined in Hasura.RQL.Types.Function

type Rep FunctionArgName Source # 
Instance details

Defined in Hasura.RQL.Types.Function

type Rep FunctionArgName = D1 ('MetaData "FunctionArgName" "Hasura.RQL.Types.Function" "graphql-engine-1.0.0-inplace" 'True) (C1 ('MetaCons "FunctionArgName" 'PrefixI 'True) (S1 ('MetaSel ('Just "getFuncArgNameTxt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

data InputArgument a Source #

Instances

Instances details
Functor InputArgument Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Methods

fmap :: (a -> b) -> InputArgument a -> InputArgument b #

(<$) :: a -> InputArgument b -> InputArgument a #

Eq a => Eq (InputArgument a) Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Show a => Show (InputArgument a) Source # 
Instance details

Defined in Hasura.RQL.Types.Function

ToJSON a => ToJSON (InputArgument a) Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Methods

toJSON :: InputArgument a -> Value

toEncoding :: InputArgument a -> Encoding

toJSONList :: [InputArgument a] -> Value

toEncodingList :: [InputArgument a] -> Encoding

_IAUserProvided :: forall a a. Prism (InputArgument a) (InputArgument a) a a Source #

data FunctionExposedAs Source #

Indicates whether the user requested the corresponding function to be tracked as a mutation or a query/subscription, in track_function.

Constructors

FEAQuery 
FEAMutation 

Instances

Instances details
Eq FunctionExposedAs Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Show FunctionExposedAs Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Generic FunctionExposedAs Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Associated Types

type Rep FunctionExposedAs :: Type -> Type #

NFData FunctionExposedAs Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Methods

rnf :: FunctionExposedAs -> () #

FromJSON FunctionExposedAs Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Methods

parseJSON :: Value -> Parser FunctionExposedAs

parseJSONList :: Value -> Parser [FunctionExposedAs]

ToJSON FunctionExposedAs Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Cacheable FunctionExposedAs Source # 
Instance details

Defined in Hasura.RQL.Types.Function

type Rep FunctionExposedAs Source # 
Instance details

Defined in Hasura.RQL.Types.Function

type Rep FunctionExposedAs = D1 ('MetaData "FunctionExposedAs" "Hasura.RQL.Types.Function" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "FEAQuery" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FEAMutation" 'PrefixI 'False) (U1 :: Type -> Type))

newtype FunctionPermissionInfo Source #

Constructors

FunctionPermissionInfo 

Fields

Instances

Instances details
Eq FunctionPermissionInfo Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Show FunctionPermissionInfo Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Generic FunctionPermissionInfo Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Associated Types

type Rep FunctionPermissionInfo :: Type -> Type #

FromJSON FunctionPermissionInfo Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Methods

parseJSON :: Value -> Parser FunctionPermissionInfo

parseJSONList :: Value -> Parser [FunctionPermissionInfo]

ToJSON FunctionPermissionInfo Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Cacheable FunctionPermissionInfo Source # 
Instance details

Defined in Hasura.RQL.Types.Function

type Rep FunctionPermissionInfo Source # 
Instance details

Defined in Hasura.RQL.Types.Function

type Rep FunctionPermissionInfo = D1 ('MetaData "FunctionPermissionInfo" "Hasura.RQL.Types.Function" "graphql-engine-1.0.0-inplace" 'True) (C1 ('MetaCons "FunctionPermissionInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "_fpmRole") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RoleName)))

data FunctionCustomRootFields Source #

Custom root fields for functions. When set, will be the names exposed to the user in the schema.

See rfcs/function-root-field-customisation.md for more information.

Instances

Instances details
Eq FunctionCustomRootFields Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Show FunctionCustomRootFields Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Generic FunctionCustomRootFields Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Associated Types

type Rep FunctionCustomRootFields :: Type -> Type #

NFData FunctionCustomRootFields Source # 
Instance details

Defined in Hasura.RQL.Types.Function

FromJSON FunctionCustomRootFields Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Methods

parseJSON :: Value -> Parser FunctionCustomRootFields

parseJSONList :: Value -> Parser [FunctionCustomRootFields]

ToJSON FunctionCustomRootFields Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Cacheable FunctionCustomRootFields Source # 
Instance details

Defined in Hasura.RQL.Types.Function

type Rep FunctionCustomRootFields Source # 
Instance details

Defined in Hasura.RQL.Types.Function

type Rep FunctionCustomRootFields = D1 ('MetaData "FunctionCustomRootFields" "Hasura.RQL.Types.Function" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "FunctionCustomRootFields" 'PrefixI 'True) (S1 ('MetaSel ('Just "_fcrfFunction") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Name)) :*: S1 ('MetaSel ('Just "_fcrfFunctionAggregate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Name))))

emptyFunctionCustomRootFields :: FunctionCustomRootFields Source #

A function custom root fields without custom names set. This is the default.

data FunctionInfo (b :: BackendType) Source #

Tracked SQL function metadata. See buildFunctionInfo.

Constructors

FunctionInfo 

Fields

Instances

Instances details
Backend b => Eq (FunctionInfo b) Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Backend b => Show (FunctionInfo b) Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Generic (FunctionInfo b) Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Associated Types

type Rep (FunctionInfo b) :: Type -> Type #

Methods

from :: FunctionInfo b -> Rep (FunctionInfo b) x #

to :: Rep (FunctionInfo b) x -> FunctionInfo b #

Backend b => ToJSON (FunctionInfo b) Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Methods

toJSON :: FunctionInfo b -> Value

toEncoding :: FunctionInfo b -> Encoding

toJSONList :: [FunctionInfo b] -> Value

toEncodingList :: [FunctionInfo b] -> Encoding

type Rep (FunctionInfo b) Source # 
Instance details

Defined in Hasura.RQL.Types.Function

type Rep (FunctionInfo b) = D1 ('MetaData "FunctionInfo" "Hasura.RQL.Types.Function" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "FunctionInfo" 'PrefixI 'True) (((S1 ('MetaSel ('Just "_fiSQLName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (FunctionName b)) :*: (S1 ('MetaSel ('Just "_fiGQLName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Name) :*: S1 ('MetaSel ('Just "_fiGQLArgsName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Name))) :*: (S1 ('MetaSel ('Just "_fiGQLAggregateName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Name) :*: (S1 ('MetaSel ('Just "_fiSystemDefined") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SystemDefined) :*: S1 ('MetaSel ('Just "_fiVolatility") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 FunctionVolatility)))) :*: ((S1 ('MetaSel ('Just "_fiExposedAs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 FunctionExposedAs) :*: (S1 ('MetaSel ('Just "_fiInputArgs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Seq (FunctionInputArgument b))) :*: S1 ('MetaSel ('Just "_fiReturnType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (TableName b)))) :*: ((S1 ('MetaSel ('Just "_fiDescription") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "_fiPermissions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 FunctionPermissionsMap)) :*: (S1 ('MetaSel ('Just "_fiJsonAggSelect") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 JsonAggSelect) :*: S1 ('MetaSel ('Just "_fiComment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))))))

fiSQLName :: forall b. Lens' (FunctionInfo b) (FunctionName b) Source #

fiReturnType :: forall b. Lens' (FunctionInfo b) (TableName b) Source #

fiGQLName :: forall b. Lens' (FunctionInfo b) Name Source #

fiGQLArgsName :: forall b. Lens' (FunctionInfo b) Name Source #

fiGQLAggregateName :: forall b. Lens' (FunctionInfo b) Name Source #

fiDescription :: forall b. Lens' (FunctionInfo b) (Maybe Text) Source #

fiComment :: forall b. Lens' (FunctionInfo b) (Maybe Text) Source #

getFunctionArgsGQLName Source #

Arguments

:: Name

The GQL version of the DB name of the function

-> FunctionConfig 
-> (Name -> Name)

Custom function for setting naming case

-> Name 

Apply function name customization to function arguments, as detailed in 'rfcs/function-root-field-customisation.md'. We want the different variations of a function (i.e. basic, aggregate) to share the same type name for their arguments.

getFunctionGQLName Source #

Arguments

:: Name 
-> FunctionConfig 
-> (Name -> Name)

Custom function for setting naming case

-> Name 

Apply function name customization to the basic function variation, as detailed in 'rfcs/function-root-field-customisation.md'.

getFunctionAggregateGQLName Source #

Arguments

:: Name 
-> FunctionConfig 
-> (Name -> Name)

Custom function for setting naming case

-> Name 

Apply function name customization to the aggregate function variation, as detailed in 'rfcs/function-root-field-customisation.md'.

data FunctionConfig Source #

Tracked function configuration, and payload of the pg_track_function and pg_set_function_customization API calls.

Constructors

FunctionConfig 

Fields

Instances

Instances details
Eq FunctionConfig Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Show FunctionConfig Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Generic FunctionConfig Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Associated Types

type Rep FunctionConfig :: Type -> Type #

NFData FunctionConfig Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Methods

rnf :: FunctionConfig -> () #

FromJSON FunctionConfig Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Methods

parseJSON :: Value -> Parser FunctionConfig

parseJSONList :: Value -> Parser [FunctionConfig]

ToJSON FunctionConfig Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Methods

toJSON :: FunctionConfig -> Value

toEncoding :: FunctionConfig -> Encoding

toJSONList :: [FunctionConfig] -> Value

toEncodingList :: [FunctionConfig] -> Encoding

Cacheable FunctionConfig Source # 
Instance details

Defined in Hasura.RQL.Types.Function

type Rep FunctionConfig Source # 
Instance details

Defined in Hasura.RQL.Types.Function

type Rep FunctionConfig = D1 ('MetaData "FunctionConfig" "Hasura.RQL.Types.Function" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "FunctionConfig" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_fcSessionArgument") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe FunctionArgName)) :*: S1 ('MetaSel ('Just "_fcExposedAs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe FunctionExposedAs))) :*: (S1 ('MetaSel ('Just "_fcCustomRootFields") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 FunctionCustomRootFields) :*: S1 ('MetaSel ('Just "_fcCustomName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Name)))))

emptyFunctionConfig :: FunctionConfig Source #

The default function config; v1 of the API implies this.

data FunctionArgsExpG a Source #

Constructors

FunctionArgsExp 

Fields

Instances

Instances details
Functor FunctionArgsExpG Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Methods

fmap :: (a -> b) -> FunctionArgsExpG a -> FunctionArgsExpG b #

(<$) :: a -> FunctionArgsExpG b -> FunctionArgsExpG a #

Foldable FunctionArgsExpG Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Methods

fold :: Monoid m => FunctionArgsExpG m -> m #

foldMap :: Monoid m => (a -> m) -> FunctionArgsExpG a -> m #

foldMap' :: Monoid m => (a -> m) -> FunctionArgsExpG a -> m #

foldr :: (a -> b -> b) -> b -> FunctionArgsExpG a -> b #

foldr' :: (a -> b -> b) -> b -> FunctionArgsExpG a -> b #

foldl :: (b -> a -> b) -> b -> FunctionArgsExpG a -> b #

foldl' :: (b -> a -> b) -> b -> FunctionArgsExpG a -> b #

foldr1 :: (a -> a -> a) -> FunctionArgsExpG a -> a #

foldl1 :: (a -> a -> a) -> FunctionArgsExpG a -> a #

toList :: FunctionArgsExpG a -> [a] #

null :: FunctionArgsExpG a -> Bool #

length :: FunctionArgsExpG a -> Int #

elem :: Eq a => a -> FunctionArgsExpG a -> Bool #

maximum :: Ord a => FunctionArgsExpG a -> a #

minimum :: Ord a => FunctionArgsExpG a -> a #

sum :: Num a => FunctionArgsExpG a -> a #

product :: Num a => FunctionArgsExpG a -> a #

Traversable FunctionArgsExpG Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Methods

traverse :: Applicative f => (a -> f b) -> FunctionArgsExpG a -> f (FunctionArgsExpG b) #

sequenceA :: Applicative f => FunctionArgsExpG (f a) -> f (FunctionArgsExpG a) #

mapM :: Monad m => (a -> m b) -> FunctionArgsExpG a -> m (FunctionArgsExpG b) #

sequence :: Monad m => FunctionArgsExpG (m a) -> m (FunctionArgsExpG a) #

Eq a => Eq (FunctionArgsExpG a) Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Show a => Show (FunctionArgsExpG a) Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Generic (FunctionArgsExpG a) Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Associated Types

type Rep (FunctionArgsExpG a) :: Type -> Type #

NFData a => NFData (FunctionArgsExpG a) Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Methods

rnf :: FunctionArgsExpG a -> () #

Hashable a => Hashable (FunctionArgsExpG a) Source # 
Instance details

Defined in Hasura.RQL.Types.Function

Cacheable a => Cacheable (FunctionArgsExpG a) Source # 
Instance details

Defined in Hasura.RQL.Types.Function

type Rep (FunctionArgsExpG a) Source # 
Instance details

Defined in Hasura.RQL.Types.Function

type Rep (FunctionArgsExpG a) = D1 ('MetaData "FunctionArgsExpG" "Hasura.RQL.Types.Function" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "FunctionArgsExp" 'PrefixI 'True) (S1 ('MetaSel ('Just "_faePositional") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [a]) :*: S1 ('MetaSel ('Just "_faeNamed") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (HashMap Text a))))