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
134 stars 46 forks source link

feat: add generatorLibrary options and allow faker to select #93

Closed MH4GF closed 2 years ago

MH4GF commented 2 years ago

closes #90, related #92

What

Add a new option generateLibrary to make faker available in addition to the existing casual.

Context

casual dependents on the node API(e.g. fs) and cannot be made to work in the browser. ref: https://github.com/ardeois/graphql-codegen-typescript-mock-data/issues/90

Additional Information

To simplify the code, we also added a class that returns the mock value generated by the library.

MH4GF commented 2 years ago

✅ TODO

ardeois commented 2 years ago

@MH4GF all good, merging and closing the issue