dotansimha / dotansimha/graphql-code-generator-community
[typescript-msw] allow to add link without name suffix
- Dominant language
- TypeScript
- Stars
- 137
- Forks
- 195
- Avg merge
- 6h 20m
- Merged PRs (30d)
- 16
Description
**Is your feature request related to a problem? Please describe.**
I'm using [link](https://the-guild.dev/graphql/codegen/plugins/typescript/typescript-msw#link) feature to config different endpoints, but in my code structure, I already use module export to split the different link.
But with link, the name wil be forced to add a suffix.
Without Link:
```ts
api1.mockGetBillingsQuery((req, res, ctx) =>
res(ctx.data({ billingInformation: { items: [] } })),
)
```
With Link:
```ts
api1.mockGetBillingsQueryApi1((req, res, ctx) =>
res(ctx.data({ billingInformation: { items: [] } })),
)
```
I think it will be nice to allow us to use link without the suffix.
**Describe the solution you'd like**
Add a `withSuffix` boolean param in configuration, and make default as `true`, as a compitible change.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.