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

Hasura.Metadata.DTO.Placeholder

Description

We are in the process of building DTO types incrementally. We use placeholder types in positions in data structures that are not fully-defined yet. For example PlaceholderObject represents some unspecified JSON object, and PlaceholderArray represents an array whose contents are not yet specified.

We are transitioning from converting Metadata directly to JSON to converting it to MetadataDTO instead. Serialization and deserialization for placeholder values is delegated to the old JSON serialization code.

Synopsis

Documentation

newtype PlaceholderArray Source #

Stands in for an array that we have not had time to fully specify yet. Generated OpenAPI documentation for PlaceholderArray will permit an array of values of any type, and a note will be appended to the documentation string for the value explaining that this is a temporary placeholder.

Constructors

PlaceholderArray Array 

Instances

Instances details
FromJSON PlaceholderArray Source # 
Instance details

Defined in Hasura.Metadata.DTO.Placeholder

ToJSON PlaceholderArray Source # 
Instance details

Defined in Hasura.Metadata.DTO.Placeholder

HasCodec PlaceholderArray Source # 
Instance details

Defined in Hasura.Metadata.DTO.Placeholder

Generic PlaceholderArray Source # 
Instance details

Defined in Hasura.Metadata.DTO.Placeholder

Associated Types

type Rep PlaceholderArray :: Type -> Type #

Show PlaceholderArray Source # 
Instance details

Defined in Hasura.Metadata.DTO.Placeholder

Eq PlaceholderArray Source # 
Instance details

Defined in Hasura.Metadata.DTO.Placeholder

ToSchema PlaceholderArray Source # 
Instance details

Defined in Hasura.Metadata.DTO.Placeholder

IsPlaceholder PlaceholderArray Array Source # 
Instance details

Defined in Hasura.Metadata.DTO.Placeholder

IsPlaceholder PlaceholderArray Array Source # 
Instance details

Defined in Hasura.Metadata.DTO.Placeholder

type Rep PlaceholderArray Source # 
Instance details

Defined in Hasura.Metadata.DTO.Placeholder

type Rep PlaceholderArray = D1 ('MetaData "PlaceholderArray" "Hasura.Metadata.DTO.Placeholder" "graphql-engine-1.0.0-inplace" 'True) (C1 ('MetaCons "PlaceholderArray" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Array)))

newtype PlaceholderObject Source #

Stands in for an object that we have not had time to fully specify yet. Generated OpenAPI documentation for PlaceholderObject will permit an object with any keys with any types of values. A note will be appended to the documentation string for the value explaining that this is a temporary placeholder.

Instances

Instances details
FromJSON PlaceholderObject Source # 
Instance details

Defined in Hasura.Metadata.DTO.Placeholder

ToJSON PlaceholderObject Source # 
Instance details

Defined in Hasura.Metadata.DTO.Placeholder

HasCodec PlaceholderObject Source # 
Instance details

Defined in Hasura.Metadata.DTO.Placeholder

Generic PlaceholderObject Source # 
Instance details

Defined in Hasura.Metadata.DTO.Placeholder

Associated Types

type Rep PlaceholderObject :: Type -> Type #

Show PlaceholderObject Source # 
Instance details

Defined in Hasura.Metadata.DTO.Placeholder

Eq PlaceholderObject Source # 
Instance details

Defined in Hasura.Metadata.DTO.Placeholder

ToSchema PlaceholderObject Source # 
Instance details

Defined in Hasura.Metadata.DTO.Placeholder

IsPlaceholder PlaceholderObject Object Source # 
Instance details

Defined in Hasura.Metadata.DTO.Placeholder

IsPlaceholder PlaceholderObject Object Source # 
Instance details

Defined in Hasura.Metadata.DTO.Placeholder

type Rep PlaceholderObject Source # 
Instance details

Defined in Hasura.Metadata.DTO.Placeholder

type Rep PlaceholderObject = D1 ('MetaData "PlaceholderObject" "Hasura.Metadata.DTO.Placeholder" "graphql-engine-1.0.0-inplace" 'True) (C1 ('MetaCons "PlaceholderObject" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Object)))

class IsPlaceholder p a | a -> p where Source #

Methods

placeholder :: a -> p Source #

Use this function to mark an Aeson type (Array or Object) as a temporary placeholder in a larger data structure.

placeholderCodecViaJSON :: (FromJSON a, ToJSON a) => JSONCodec a Source #

This placeholder can be used in a codec to represent any type of data that has FromJSON and ToJSON instances. Generated OpenAPI specifications based on this codec will not show any information about the internal structure of the type so ideally uses of this placeholder should eventually be replaced with more descriptive codecs.