Derive FromGraphQL and ToGraphQL automatically #6

Closed
opened 2024-07-08 13:28:17 +02:00 by belka · 0 comments
Owner

Functions should be provided that generate FromGraphQL and ToGraphQL instances using Template Haskell.

FromGraphQL

  • Records, where all fields have a FromGraphQL instance. This is InputObject.
  • Sum types with data constructors without arguments. This is Enum.

Since `FromGraphQL´ is used for arguments, unions aren't supported.

ToGraphQL

  • Records, where all fields have a ToGraphQL instance. This is Object.
  • Sum types with data constructors without arguments. This is Enum.
  • Sum types, where all data constructors have one argument. This is Union.
Functions should be provided that generate `FromGraphQL` and `ToGraphQL` instances using Template Haskell. ## FromGraphQL - Records, where all fields have a `FromGraphQL` instance. This is `InputObject`. - Sum types with data constructors without arguments. This is `Enum`. Since `FromGraphQL´ is used for arguments, unions aren't supported. ## ToGraphQL - Records, where all fields have a `ToGraphQL` instance. This is `Object`. - Sum types with data constructors without arguments. This is `Enum`. - Sum types, where all data constructors have one argument. This is `Union`.
belka added the
Kind
enhancement
label 2024-07-08 13:28:17 +02:00
belka added the
Status
fixed
label 2024-07-19 12:59:04 +02:00
belka closed this issue 2024-07-19 12:59:15 +02:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: OSS/graphql-spice#6
No description provided.