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

Responses not typed in VS Code #591

Open
BorisKamp opened this issue Jan 10, 2025 · 3 comments
Open

Responses not typed in VS Code #591

BorisKamp opened this issue Jan 10, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@BorisKamp
Copy link

Environment

Describe the bug

I remember in the past, that responses from Gql... auto created functions were typed, but in my recent project, that is no more.
See my screenshot here:
Screenshot 2025-01-10 at 09 09 02
response is any here...

In .nuxt/gql/default.ts I see the OrdersQuery generated, but it is not used somehow?
Screenshot 2025-01-10 at 09 09 45

Does anybody have a clue? It is very annoying that I get those TS errors because responses are any

Expected behaviour

The responses to be typed

Reproduction

No response

Additional context

No response

Logs

No response

@BorisKamp BorisKamp added the bug Something isn't working label Jan 10, 2025
@dacaga
Copy link

dacaga commented Jan 15, 2025

Same here, for SSR code only. Vuejs files seem to be using types from .nuxt/types/imports.d.ts and are typed properly. I can manually change the typeof import in nitro-imports.d.ts from typeof import('#gql-nitro') to typeof import('#gql') and it then works for server side code.

@dacaga
Copy link

dacaga commented Jan 15, 2025

Probably related to #333 and its proposed fix!

@BorisKamp
Copy link
Author

BorisKamp commented Jan 15, 2025

Probably related to #333 and its proposed fix!

That sounds good, when can we expect the fix in a release? And does that also mean the broken fragments are fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants