Skip to content

Deriving query code from type #66

@CGenie

Description

@CGenie

Hello,

Suppose I have a type

newtype User = 
  { id :: Int
  , name  :: String
}

Is it possible to automatically create a "full" query for it? I.e I don't want to type

type UserGQL =
  { id :: Int
  , name :: String
  }

and then create a schema out of it, and then remap the UserGQL from the response but just directly define User in schema and have it automatically generate all fields for the query?

Just a note: my model is more complex, with complex types inside of it. On the Haskell side I'm able to derive the deeply nested models structure via the Morpheus library without hand-writing anything.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions