Migrating to 2.0
Welcome to the upgrade guide for Houdini 2.0! This update is the largest release in Houdini’s history and so there are a number of things to keep in mind and go over when migrating your application to 2.0.
New Dependency Versions
Hopefully this one is easy. There are a few major version updates to Houdini’s dependencies:
"vite": "^7.0.0"
"graphql": "^16.10.0."
Removal of +page.gql in SvelteKit projects
In short, +page.gql and +layout.gql are no longer supported due to a regression in SvelteKit’s logic.
This is somewhat of a double-edged sword: on one hand we’ve lost a relatively streamlined
integration in SvelteKit however that integration was a relatively significant
limitation when it came time to integrate with some of Kit’s powerful features like
streaming promises or the upcoming asynchronous features in svelte.
You’ve got 2 options: either, define your loads manually or rely on automatic loading via _houdini_load.
Session Support in SvelteKit
The same regression that affected +page.gql support has also made it more complicated to support session information. Whereas before things “Just Worked”, you must now define 2 different files: src/routes/+layout.js and src/routes/+layout.server.js:
export const _houdini_session = true
export const _houdini_session = true
You can also define these as .ts if you prefer.