When using the codegen cli tool to create my ts definitions for urql graphcache, the prefix for the mutation args for optimistic update functions is always "Mutation". In my schema it should be prefixed with "Mutation_Root".
The error is caused on this line
https://github.com/dotansimha/graphql-code-generator/blob/e8bc3fd2382d291aaacd4c78b54c759f4d791218/packages/plugins/typescript/urql-graphcache/src/index.ts#L189
Whereas the naming on the regular update function is correct because it dynamically creates the mutation arg prefix with `rootType.name`
https://github.com/dotansimha/graphql-code-generator/blob/e8bc3fd2382d291aaacd4c78b54c759f4d791218/packages/plugins/typescript/urql-graphcache/src/index.ts#L156
**To Reproduce**
`npm run generate`
```js
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"test:unit": "vue-cli-service test:unit",
"test:e2e": "vue-cli-service test:e2e",
"lint": "vue-cli-service lint",
"generate": "graphql-codegen"
},
```
Describe the bug
When using the codegen cli tool to create my ts definitions for urql graphcache, the prefix for the mutation args for optimistic update functions is always "Mutation". In my schema it should be prefixed with "Mutation_Root". The error is caused on this line https://github.com/dotansimha/graphql-code-generator/blob/e8bc3fd2382d291aaacd4c78b54c759f4d791218/packages/plugins/typescript/urql-graphcache/src/index.ts#L189 Whereas the naming on the regular update function is correct because it dynamically creates the mutation arg prefix with `rootType.name` https://github.com/dotansimha/graphql-code-generator/blob/e8bc3fd2382d291aaacd4c78b54c759f4d791218/packages/plugins/typescript/urql-graphcache/src/index.ts#L156 **To Reproduce** `npm run generate` ```js "scripts": { "serve": "vue-cli-service serve", "build": "vue-cli-service build", "test:unit": "vue-cli-service test:unit", "test:e2e": "vue-cli-service test:e2e", "lint": "vue-cli-service lint", "generate": "graphql-codegen" }, ```Incorrect optimistic updates
Correct graphcache updates
codegen.yml
config file:Expected behavior
Optimistic update arguments prefix should be dynamically named based on the definition in the schema.
Environment:
Additional context