houdini icon indicating copy to clipboard operation
houdini copied to clipboard

Accessing GQL store while loading in an other route breaks SSR

Open janvotava opened this issue 3 years ago • 2 comments

Demo: https://github.com/janvotava/houdini-error-reproduce-001

When the $GQL store is read in the __layout.svelte, the resulting data in the routes/index.svelte will be null for some reason and SSR won't work.

janvotava avatar Aug 04 '22 05:08 janvotava

After digging into this a bit, it turns out that the issue is that the store's value gets deleted from the unsubscribe which erases the value being rendered (at least that's my current working model). I have a branch with a failing test here: https://github.com/HoudiniGraphql/houdini/tree/same-store-twice.

Since fixing this is a slightly larger effort, I'd like to wait until #449 is in so we don't have a lot of conflicts to sift through. Once that goes in, fixing this will be at the top of our list

AlecAivazis avatar Aug 04 '22 07:08 AlecAivazis

I have a hunch that #449 will fix this. hopefully one of us will remember to confirm when its merged

AlecAivazis avatar Aug 09 '22 06:08 AlecAivazis