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

Is it possible to split up the generated mocks? #147

Closed alexeyr-ci closed 11 months ago

alexeyr-ci commented 11 months ago

In my case the generated file has over 20 000 lines, and surprisingly, trying to open it nearly hangs IDEA. I expect if it could be split into parts and the main file re-exporting all the functions they define it would resolve the problem.

I could try to provide a PR.

alexeyr-ci commented 11 months ago

It looks like plugin API doesn't support generating multiple files in the sense I wanted, ended up solving this with an afterOneFileWrite hook.