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
On a root page we have a query that gets executed and split into fragments; we then pass down the data into components. To have type-safety we define the props with the fragment type
// child component
import type { ComponentsProductSliderFragment } from '#gql'
const props = defineProps<{
data: Enforce<ComponentsProductSliderFragment>
}>()
The solution you'd like
Currently we have to define the import with import type { ComponentsProductSliderFragment } from '#gql'. I'd much rather have this one also present in the index.d.ts that gets auto imported with Nuxt. So that we have easy access to the query definitions, fragments and scalars.
Possible alternatives
No response
Additional information
Is there a reason for the current separation?
The text was updated successfully, but these errors were encountered:
Your use case
On a root page we have a query that gets executed and split into fragments; we then pass down the data into components. To have type-safety we define the props with the fragment type
The solution you'd like
Currently we have to define the import with
import type { ComponentsProductSliderFragment } from '#gql'
. I'd much rather have this one also present in the index.d.ts that gets auto imported with Nuxt. So that we have easy access to the query definitions, fragments and scalars.Possible alternatives
No response
Additional information
Is there a reason for the current separation?
The text was updated successfully, but these errors were encountered: