How to define JSON custom scalar type in graphql which can be nullable?

How to define JSON custom scalar type in graphql which can be nullable?


0

https://github.com/graphql/graphql-js/issues/3532#issuecomment-1125126566

serialize() can not return null, so I’m getting GRAPHQL error {"errors":[{"message":"Expected JsonType.serialize("null") to return non-nullable value, returned: null" error where JsonType is my customized scalar.

tried to return undefined but it’s not working either.

New contributor

user22803426 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


Load 4 more related questions


Show fewer related questions

0



Leave a Reply

Your email address will not be published. Required fields are marked *