graphql-codegen-typescript-mock-data
graphql-codegen-typescript-mock-data copied to clipboard
Support faker for custom scalars
scalars
option allows to use custom generator function from casual
Now we have generateLibrary
supporting faker
, we should allow custom generator functions from faker as well
memo:
- casual is only one level with property calls, like this:
country
=>casual["country"] // 'United Kingdom'
- Some generators may be function calls that specify arguments:
integer
=>integer(from = -1000, to = 1000) // 632
- Some generators may be function calls that specify arguments:
- faker is a nested and method chain:
faker.address.country() // 'Greece'
This is an interface similar to casual 🤔 : address.country
=> faker["address"]["country"]()
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.