-
Getting those errors after generating and trying to compile with typescript: src/api/graphql/generated/client/gql.ts:5:7 - error TS7034: Variable 'documents' implicitly has type 'any[]' in some locations where its type cannot be determined.
5 const documents = [];
~~~~~~~~~
src/api/graphql/generated/client/gql.ts:21:11 - error TS7005: Variable 'documents' implicitly has an 'any[]' type.
21 return (documents as any)[source] ?? {};
~~~~~~~~~ My overwrite: true
schema: "./src/api/graphql/schema.graphql"
documents: null
generates:
./src/api/graphql/generated/client/:
preset: "client-preset"
./src/api/graphql/generated/graphql.ts:
plugins:
- "typescript"
- "typescript-resolvers"
config:
enumsAsConst: true Is it normal? Any way to get tsc to compile those files? |
Beta Was this translation helpful? Give feedback.
Answered by
saihaj
Mar 6, 2023
Replies: 2 comments 5 replies
-
it looks like you are not really generating any types for any operations. I mean this is like an edge case cause most times there are types you are generating to the type of |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
n1ru4l
-
I was facing the same issue. Naming the queries fixed it for me |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
it looks like you are not really generating any types for any operations. I mean this is like an edge case cause most times there are types you are generating to the type of
documents
will always be something