Open
Description
Describe the bug
Enums defined in the graphql schema are transpiled into typescript type definitions.
For the purpose of mapping responses from a connected shop into one of those enums the types are not feasible at all.
An example is the MeasurementUnit
enum, that will get transpiled to
export type MeasurementUnit =
| 'ACRE'
| 'ARES'
this isn't very usable when hydrating the article.salesUnit.name
field from the response of a connected shop, as this will always be a String, which isn't allowed as MeasurementUnit
.
Proposal is to either find a way that enums from the graphql schema are transpiled to enums in typescript or always add the String
to those enums, which makes them useless.
Metadata
Metadata
Assignees
Labels
No labels