shopify-api-js
shopify-api-js copied to clipboard
Can't import `enum` from generated GraphQL type definition files
The GraphQL type definitions are generated into admin.types.d.ts
file as per: https://github.com/Shopify/shopify-api-js/blob/3e55838fe4f192d5d639670834f2a002800ba271/packages/api-codegen-preset/src/helpers/api-configs.ts#L24
The problem I'm facing is that I can't import enum
from the generated file - .d.ts files are discarded during compilation.
So this import won't work:
import { ImageContentType } from "~/types/admin.types";
[ERROR] Could not resolve "~/types/admin.types"
:
Am I maybe wrong to try to import stuff from those files and they should be used somehow differently?