You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.
If trying to generate this model file, graphqlgen will throw an error about TypeError: Cannot read property 'kind' of undefined.
After some debugging, I found this is because of graphqlgen cannot build type getter for the imported type A.
I have seen something like filesToTypesMap and addFileToTypesMap are related to this, but looks like they are used for testing. So is it possible to have this kind of import working?
Additional context
I think this is useful when using graphqlgen with Prisma because Prisma will generate types according to the enums in the datamodel. And custom models may use this enum which needs to import types from the generated Prisma client types.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
Currently, I found we could not use types imported from other files in the model file. For example, if I have two typescript files like this:
If trying to generate this model file, graphqlgen will throw an error about
TypeError: Cannot read property 'kind' of undefined
.After some debugging, I found this is because of graphqlgen cannot build type getter for the imported type
A
.I have seen something like
filesToTypesMap
andaddFileToTypesMap
are related to this, but looks like they are used for testing. So is it possible to have this kind of import working?Additional context
I think this is useful when using graphqlgen with Prisma because Prisma will generate types according to the enums in the datamodel. And custom models may use this enum which needs to import types from the generated Prisma client types.
The text was updated successfully, but these errors were encountered: