ardeois / graphql-codegen-typescript-mock-data

[GraphQL Codegen Plugin](https://github.com/dotansimha/graphql-code-generator) for building mock data based on the schema.
MIT License
133 stars 47 forks source link

Feature Request: Custom Scalar Definitions #20

Closed 3nvi closed 4 years ago

3nvi commented 4 years ago

@ardeois to begin with, thanks for all the work being put in this plugin.

In our app we use AWS Appsync Scalars, which add specific GraphQL types for dates. Unfortunately, one of them is AWSTimeStamp which maps to a timestamp (number).

Currently, as it stands, this plugin translates all the custom scalars into strings which breaks our TS validation, since we expected a number.

Given the fact that you said that custom scalars need to accept custom definitions, my question would be whether you have immediate plans to support it and/or whether you would be open to accepting PRs to add this functionality.

Thanks in advance