TypeScript error when importing List from separate file #9156
Unanswered
carlosgrossi
asked this question in
Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi folks,
I'm encountering a TypeScript error in my schema.ts file when I import a List from a separate .ts file. Here is the error message:
The error disappears if I add the List definition directly within schema.ts:
Alternatively, renaming the key from User to Users also removes the TypeScript error:
However, this change causes a GraphQL error when starting the server:
My Question:
What am I doing wrong? Is it possible to split the schema definitions into separate files for each List in KeystoneJS? If so, what is the correct way to do this to avoid this?
Beta Was this translation helpful? Give feedback.
All reactions