typescript-generic-sdk unused generic paramter
Describe the bug
When generating a generic SDK (without raw requests) an unused generic param is introduced. This causes typescript errors when noUnusedParameters is set to true.
The bug was introduced in https://github.com/dotansimha/graphql-code-generator/pull/7689, ideally in https://github.com/dotansimha/graphql-code-generator/pull/7689/files#diff-c0735fcd78dffef10d637a4d56bc3d1e70efa65258aa96533d0fcced83254e75R98 a check should be added that if we are not generating a raw request the additional E generic should be dropped
Your Example Website or App
https://codesandbox.io/s/nameless-sky-t833oi?file=/types.ts
Steps to Reproduce the Bug or Issue
- Use latest version of typescript-generic-sdk
- When generating the sdk the Requester type had an unused generic param
Expected behavior
I expect that the generated sdk does not contain unused params
Screenshots or Videos

Platform
- OS: macOs
- NodeJS: 16
-
graphqlversion: 16.5.0 -
@graphql-codegen/*version(s):- "@graphql-codegen/add": "3.2.0",
- "@graphql-codegen/cli": "^2.4.0",
- "@graphql-codegen/typescript": "2.7.2",
- "@graphql-codegen/typescript-operations": "2.5.2",
- "@graphql-codegen/typescript-generic-sdk": "2.5.0",
- "graphql": "16.5.0",
- "typescript": "4.7.4"
Codegen Config File
schema: schema.graphql
documents: document.graphql
generates:
types.ts:
config:
avoidOptionals:
field: true
documentMode: string
pureMagicComment: true
dedupeFragments: true
plugins:
- typescript
- typescript-operations
- typescript-generic-sdk
Additional context
No response
@dotansimha @ardatan Sorry to tag you guys, but I'm having the same problem as well, any ideas what's happening?!
I just updated the package and I'm encountering this issue, I don't know what the E type parameter is even about :/
Hey ! I just wrote a PR addressing this issue. Hope it can speed up the resolution 💪
Thanks for pointing out this issue 🙇
https://github.com/dotansimha/graphql-code-generator/pull/8313