Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

json-schema type alias translates to union in GraphQL #7

Open
mdesousa opened this issue May 24, 2021 · 1 comment
Open

json-schema type alias translates to union in GraphQL #7

mdesousa opened this issue May 24, 2021 · 1 comment

Comments

@mdesousa
Copy link

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

@grantila
Copy link
Owner

Thanks, will fix this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants