-
I'm submitting a ...
[X] bug report
[ ] feature request
[ ] question about the decisions made in the repository
[ ] question about how to use this project
-
Summary
At our company, we're working with multiple GraphQL services, and it can happen to have queries with the same identifier, which result on duplicated key generation for hooks. Example:
generates:
# Api codegen
libs/backoffice/api/graphql/yacooba/request.ts:
documents:
- 'apps/**/*.yacooba.graphql'
- 'libs/**/*.yacooba.graphql'
plugins:
- typescript
- typescript-operations
- typescript-graphql-request
- plugin-typescript-swr
config:
autogenSWRKey: true
skipTypename: true
libs/backoffice/api/graphql/protocol/request.ts:
documents:
- 'apps/**/*.protocol.graphql'
- 'libs/**/*.protocol.graphql'
plugins:
- typescript
- typescript-operations
- typescript-graphql-request
- plugin-typescript-swr
config:
autogenSWRKey: true
skipTypename: true
The two apis have two queries with the same name, (events), resulting on the generation of two hooks with the same key:
Api 1:

Api 2:

Is there any way to avoid this, maintaining the configuration autogenSWRKey active ?
I'm submitting a ...
[X] bug report
[ ] feature request
[ ] question about the decisions made in the repository
[ ] question about how to use this project
Summary
At our company, we're working with multiple GraphQL services, and it can happen to have queries with the same identifier, which result on duplicated key generation for hooks. Example:
The two apis have two queries with the same name, (
events), resulting on the generation of two hooks with the same key:Api 1:

Api 2:

Is there any way to avoid this, maintaining the configuration
autogenSWRKeyactive ?