graphql-codegen-typescript-fabbrica
graphql-codegen-typescript-fabbrica copied to clipboard
Add factory for creating the fake data of Operation/Fragment
Hello.
First of all thanks for the plugin! It has many great features.
My question is related to operation/fragment mocks. Did you consider such a feature to support creating mocks for operation/fragments next to the file that contains the type? For example:
src/
├── libs
│ └── feature-one/
│ ├── get-feature-one-data.ts
│ └── get-feature-one-data.mock.ts // <- generated by 'fabbrica'
│ └── feature-two/
│ ├── get-feature-two-data.ts
│ └── get-feature-two-data.mock.ts // <- generated by 'fabbrica'
The plugin would generate get-feature-one-data.mock.ts
file next to the operation/fragment. Such a feature is in this plugin https://stackblitz.com/github/zhouzi/graphql-codegen-factories/tree/main/examples/usage-with-near-operation-file-preset but it's not maintained anymore.