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

Handle Custom scalar type like Date #49

Open
tapanShowbie opened this issue Dec 13, 2021 · 1 comment
Open

Handle Custom scalar type like Date #49

tapanShowbie opened this issue Dec 13, 2021 · 1 comment

Comments

@tapanShowbie
Copy link

Hi I have a graphql schema, where I have a custom scalar type defined. How do we handle serialization and deserialization of custom scalar type.

@jneurock
Copy link
Collaborator

Hi. Can you explain a bit more about what kind of issues you're facing? In some cases, you don't have to do anything other than seed Mirage's database with records having values for fields of your custom scalar type that contain data you want.

If you want to go further, Mirage provides a way to customize serialization. See Mirage Serializer docs. An alternative would be to lean on custom resolvers to do the work but that might not be a great solution if the custom scalar types are commonly used.

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