quinnvaughn
quinnvaughn
SSolidJS
Created by Đăng Tú on 1/28/2025 in #support
Is there away to pass all variable to all children components
Yep, classic use case for context
3 replies
SSolidJS
Created by quinnvaughn on 1/24/2025 in #support
How to integrate Apollo Client into Solid Start with SSR?
Basically you're grabbing all the queries ahead of time and using that to hydrate the initial state, which you inject into the window for the client side cache to set its initial values with
30 replies
SSolidJS
Created by quinnvaughn on 1/24/2025 in #support
How to integrate Apollo Client into Solid Start with SSR?
And there is no way to easily update the client side cache because that's normally done with either getDataFromTree (in apollo on React) or prepass() (in urql on React)
30 replies
SSolidJS
Created by quinnvaughn on 1/24/2025 in #support
How to integrate Apollo Client into Solid Start with SSR?
So like we generate a list of things, which should remove the list on the sidebar completely and replace them with the new list, but that's not the top level query for the sidebar. But the client side cache is completely unaware that those things exist because the mutation is on the client but the data was initially gotten on the server side.
30 replies
SSolidJS
Created by quinnvaughn on 1/24/2025 in #support
How to integrate Apollo Client into Solid Start with SSR?
Well the issue isn't for multiple queries. It's that the initial data is being gotten on the server, so the client side cache is completely unaware of it when you then try to update the cache after a mutation.
30 replies
SSolidJS
Created by quinnvaughn on 1/24/2025 in #support
How to integrate Apollo Client into Solid Start with SSR?
Also still seems to do an initial render on dev from the server?
30 replies
SSolidJS
Created by quinnvaughn on 1/24/2025 in #support
How to integrate Apollo Client into Solid Start with SSR?
Doesn't really solve that I'm not sure how you would do this properly in SolidStart, but it is a workaround
30 replies
SSolidJS
Created by quinnvaughn on 1/24/2025 in #support
How to integrate Apollo Client into Solid Start with SSR?
Well an alternative to our solution is that literally we just don't use ssr, however I still get issues like this on dev - https://github.com/solidjs/solid-start/issues/519, which is clearly not fixed. We have zero need for SEO etc, this is purely a dashboard view for our clients.
30 replies
SSolidJS
Created by quinnvaughn on 1/24/2025 in #support
How to integrate Apollo Client into Solid Start with SSR?
https://codesandbox.io/p/devbox/solid-start-urql-dnjcly this is what I have so far. Not the best example since you can't mutate that API but will do for this I guess.
30 replies
SSolidJS
Created by quinnvaughn on 1/24/2025 in #support
How to integrate Apollo Client into Solid Start with SSR?
Side note - the default Code Sandbox template for Solid Start doesn't work, you may want to reach out to someone there about it. "Error when evaluating SSR module $vinxi/handler/ssr: |- Error: Client-only API called on the server side. Run client-only code in onMount, or conditionally run client-only component with <Show>." It doesn't look obviously wrong though. Edit: Upgrading all dependencies worked though.
30 replies
SSolidJS
Created by quinnvaughn on 1/24/2025 in #support
How to integrate Apollo Client into Solid Start with SSR?
In fact, I'll put together a basic thing with the Rick and Morty API with the relevant code bits so you wouldn't have to start from zero.
30 replies
SSolidJS
Created by quinnvaughn on 1/24/2025 in #support
How to integrate Apollo Client into Solid Start with SSR?
Gotcha, well I can send you anything else you'd need.
30 replies
SSolidJS
Created by quinnvaughn on 1/24/2025 in #support
How to integrate Apollo Client into Solid Start with SSR?
No description
30 replies
SSolidJS
Created by quinnvaughn on 1/24/2025 in #support
How to integrate Apollo Client into Solid Start with SSR?
No description
30 replies
SSolidJS
Created by quinnvaughn on 1/24/2025 in #support
How to integrate Apollo Client into Solid Start with SSR?
So I switched this to urql because it seemed slightly easier to integrate but still same issue - does anyone from the start team know how to do this? @Brendonovich (I can't seem to @ that role). Re urql I'd have to add an equivalent to the prepass function but StartServer doesn't seemingly accept that being async. https://commerce.nearform.com/open-source/urql/docs/advanced/server-side-rendering/
30 replies
SSolidJS
Created by quinnvaughn on 1/24/2025 in #support
How to integrate Apollo Client into Solid Start with SSR?
Because I had ChatGPT help me with a function that seemingly can replicate it but I can't get past that point
30 replies
SSolidJS
Created by quinnvaughn on 1/24/2025 in #support
How to integrate Apollo Client into Solid Start with SSR?
You get const first = html.indexOf(marker); ^ TypeError: Cannot read properties of undefined (reading 'indexOf') doing nothing but changing it to createHandler(async () => {...etc}). mode: 'async' inside StartServer doesn't seem to change that fact.
30 replies
SSolidJS
Created by quinnvaughn on 1/24/2025 in #support
How to integrate Apollo Client into Solid Start with SSR?
Yes I'm aware. An issue I'm seeing is seemingly you cannot make createHandler's passed in function async or it breaks?
30 replies
SSolidJS
Created by quinnvaughn on 1/24/2025 in #support
How to integrate Apollo Client into Solid Start with SSR?
Basically this creates a ton of weird issues where the cache is not aware of itself
30 replies
SSolidJS
Created by quinnvaughn on 1/24/2025 in #support
How to integrate Apollo Client into Solid Start with SSR?
Well in React it's not that much work, I just don't see an equivalent to getDataFromTree
30 replies