Forward +page.server.ts data with automatic load #1327
Labels
Enhancement
A new feature or improvement to Houdini's public API
SvelteKit
Issues related to the SvelteKit integration
Describe the feature
If you have a +page.server.ts where you are returning data and you have a +page.gql as well, then you will never have the data from the server load.
The current workaround is to manually write a PageLoad with
return { ...event.data, ...(await load_MyQuery(event)) }
which isn't ideal.Whenever we have a +page.server.ts we should also add
...event.data
to the return object of the generated load function.Criticality
nice to have
The text was updated successfully, but these errors were encountered: