Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript Import Fails after generating --node #370

Closed
lukepolo opened this issue Mar 23, 2023 · 2 comments
Closed

Typescript Import Fails after generating --node #370

lukepolo opened this issue Mar 23, 2023 · 2 comments

Comments

@lukepolo
Copy link

After running the script

zeus http://hasura:8080/v1/graphql ./generated/hasura --node --header=x-hasura-admin-secret:$HASURA_ADMIN_SECRET

It will generate

image

But inside index.ts it tries to include a .js file

import { AllTypesProps, ReturnTypes, Ops } from './const.js';

This breaks the build process

@lukepolo
Copy link
Author

lukepolo commented Aug 22, 2023

i found that this line breaks it

https://github.com/graphql-editor/graphql-zeus/blob/4a309df2b77dde9a4dfcf52b8adff371f6ff79cc/packages/graphql-zeus-core/TreeToTS/index.ts#L109C42-L109C42

 indexImports: `import { AllTypesProps, ReturnTypes, Ops } from './const${
        esModule || env === 'node' ? '.js' : ''
      }';`.concat(

@lukepolo
Copy link
Author

one of the latest releases seems to have fixed this issue for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant