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
Because of the update to export only global types, enum values break. That is, because enum values pass through the types to the underlying Gatbsy compilation process, the Gatsby compilation process doesn't know how to handle the global types. Example below.
GraphQL definition
enumMyEnum {
SOME_VALUE OTHER_VALUE
}
This gets transformed to the following in gatsby-types.ts
But the actual Gatsby build fails where GatbsyTypes is needed in the runtime because it can't find GatsbyTypes with an error of "GatsbyTypes" is not defined. Is it possible to emit both the global types and the older importable types? Otherwise, is there better solution to this?
The text was updated successfully, but these errors were encountered:
Because of the update to export only global types, enum values break. That is, because enum values pass through the types to the underlying Gatbsy compilation process, the Gatsby compilation process doesn't know how to handle the global types. Example below.
GraphQL definition
This gets transformed to the following in
gatsby-types.ts
Typescript then allows the following usage:
But the actual Gatsby build fails where GatbsyTypes is needed in the runtime because it can't find GatsbyTypes with an error of
"GatsbyTypes" is not defined
. Is it possible to emit both the global types and the older importable types? Otherwise, is there better solution to this?The text was updated successfully, but these errors were encountered: