-
I just moved from I can't figure out what it is I'm doing wrong and adding I for example have this query defined in a const RemoveSegmentationCodeMutation = gql`
mutation RemoveSegmentationCode(
$id: Int!,
) {
removeSegmentationCode(personId: $id)
}
`; and after running My configuration looks like this: generates:
src/gql/typings.tsx:
config:
namingConvention: keep
exportFragmentSpreadSubTypes: true
inlineFragmentTypes: combine
nonOptionalTypename: true
plugins:
- "typescript"
- "fragment-matcher"
- "typescript-react-apollo"
- "typescript-operations" |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Ah found out the issue! I didn't see the error as I currently have a few hundred errors and am fixing one by one, but this error was split into two and the error way before is that: the graphql type is called Fix is to just rename the typescript document variable or the graphql type name. |
Beta Was this translation helpful? Give feedback.
Ah found out the issue! I didn't see the error as I currently have a few hundred errors and am fixing one by one, but this error was split into two and the error way before is that:
the graphql type is called
RemoveSegmentationCode
and the generator is adding aMutation
suffix to that in the typescript type, which then causes a conflict, because of the typescript variable of the document is already called that.Fix is to just rename the typescript document variable or the graphql type name.