typeconv
typeconv copied to clipboard
json-schema type alias translates to union in GraphQL
Hi, one additional issue... when you have a type definition in json-schema like this:
"DateTimeIso8601": {
"type": "string",
"description": "A datetime in ISO-8601 format (YYYY-MM-DDTHH:MM:SS.MMMZ)",
"format": "date-time"
}
It results in a union of String in graphql, like this: union DateTimeIso8601 = String
This is invalid graphql and results in an error:
Union type DateTimeIso8601 can only include Object types, it cannot include String.
Thanks
Thanks, will fix this!