Skip to content

Support custom scalars in json serialiser #216

@aarne

Description

@aarne

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions