Skip to content

Have an InputObject combinator in the same spirit as Enum #79

Open
@teh

Description

@teh

Right now enums in our schema are marked explictly as such:

data DogCommandEnum = Sit | Down | Heel deriving (Show, Eq, Ord, Generic)
instance GraphQLEnum DogCommandEnum

type  D = Argument "dogCommand" ( Enum "DogCommand" DogCommandEnum) :> Field "doesKnowCommand" Bool

it might make sense to have an InputObject (name :: Symbol) (t :: Type) as well to mark input objects. This would be more consistent with Enum, and normal Object. It would allow us to require a specific ReadInputObject type class instead of FromValue but whether that's desirable is an open question.

Not a super clear design choice overall.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions