Open
Description
Which packages are impacted by your issue?
No response
Describe the bug
I am using graphql-codegen with typescript and it works fine, but on provided query, codegen throws
Error 0: Unknown type "UUID". Did you mean "ID"?
I cannot replace "UUID" with "ID" as its used in company's schema and cannot be changed (only names there were changed)
const CREATE_TOKEN = /* GraphQL */ `
mutation GenerateToken($uuid: UUID!) {
generateToken(uuid: $uuid) {
token
}
}
`;
export default CREATE_TOKEN;
Your Example Website or App
cannot.provide.it
Steps to Reproduce the Bug or Issue
- From my side, using UUID itself provides this issue
Expected behavior
I expected this query to have generated types, not throwing an error
Screenshots or Videos
No response
Platform
- OS: Ubuntu 22.04
- NodeJS v19.2.0
- "@graphql-codegen/cli": "^2.16.4",
- "@graphql-codegen/typescript": "^2.8.7",
- "@graphql-codegen/typescript-operations": "^2.5.12",
Codegen Config File
const config: CodegenConfig = {
overwrite: true,
schema: [
{
'https://some.graphql.api/': {
headers: {
Authorization: accessToken,
},
},
},
],
documents: 'src/graphql/*.js',
generates: {
'src/types/graphql/': {
plugins: [
'typescript',
'typescript-operations',
],
},
},
hooks: {
afterAllFileWrite: 'prettier src/types/graphql --write ',
},
};
export default config;
Additional context
No response