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

Support custom scalars in json serialiser #216

Open
aarne opened this issue Jul 7, 2023 · 0 comments
Open

Support custom scalars in json serialiser #216

aarne opened this issue Jul 7, 2023 · 0 comments

Comments

@aarne
Copy link

aarne commented Jul 7, 2023

Currently only Int, Float, String, Boolean and ID scalars are supported while generating the json-schema for fast-json-stringify. Any unknown scalar triggers "Got unexpected PRIMITIVES type: XXX" error to be thrown.

https://github.com/zalando-incubator/graphql-jit/blame/9b2ef2036c820473044d8d9cef36a58f81ff9800/src/json.ts#L177

Prior to 0.8.2 the default type was {} (meaning AnySchema) instead of exception.

It would be nice the have a better support for custom scalars or at least restore the previous behaviour as in https://github.com/zalando-incubator/graphql-jit/blame/2df0bbfd6a6626d9f8230a30b5068ec1efaedbe0/src/json.ts#L165

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

1 participant