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

Hasura.Metadata.DTO.Metadata

Synopsis

Documentation

data MetadataDTO Source #

Exported representation of the GraphQL Engine metadata configuration format.

The OpenAPI specification for metadata is experimental and incomplete. Please do not incorporate it into essential workflows at this time.

Instances

Instances details
Eq MetadataDTO Source # 
Instance details

Defined in Hasura.Metadata.DTO.Metadata

Show MetadataDTO Source # 
Instance details

Defined in Hasura.Metadata.DTO.Metadata

Generic MetadataDTO Source # 
Instance details

Defined in Hasura.Metadata.DTO.Metadata

Associated Types

type Rep MetadataDTO :: Type -> Type #

HasCodec MetadataDTO Source #

Sum types translate to union types in OpenApi documents via disjointEitherCodec (or via eitherCodec if the encoded JSON is not necessarily disjoint). In this case we ensure that the encodings of MetadataV1, MetadataV2, and MetadataV3 are disjoint by using versionField in the codec for each variant which injects a field into the JSON representation that requires a specific number to parse successfully. (MetadataV1 is the only variant where the version field is optional.)

A codec that represents more than two variants of different types requires nesting disjointEitherCodec. Thankfully in the generated OpenApi documentation these three variants are flattened into a single oneOf list of allowed schemas.

Instance details

Defined in Hasura.Metadata.DTO.Metadata

FromJSON MetadataDTO Source # 
Instance details

Defined in Hasura.Metadata.DTO.Metadata

Methods

parseJSON :: Value -> Parser MetadataDTO

parseJSONList :: Value -> Parser [MetadataDTO]

ToJSON MetadataDTO Source # 
Instance details

Defined in Hasura.Metadata.DTO.Metadata

Methods

toJSON :: MetadataDTO -> Value

toEncoding :: MetadataDTO -> Encoding

toJSONList :: [MetadataDTO] -> Value

toEncodingList :: [MetadataDTO] -> Encoding

ToSchema MetadataDTO Source # 
Instance details

Defined in Hasura.Metadata.DTO.Metadata

Methods

declareNamedSchema :: Proxy MetadataDTO -> Declare (Definitions Schema) NamedSchema

type Rep MetadataDTO Source # 
Instance details

Defined in Hasura.Metadata.DTO.Metadata