-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
The goal of the spike is to provide developers a graphql query client that can run on both the server and the client
For instance, when running in a server-rendered island:
// Foo.client.tsx
export default function Foo() {
// This will run on the server and on every re-render of the component
const { data } = useGQLQuery({
query: `query { ... }`
})
return <div>{data}</div>;
}
// default.server.tsx
jahiaComponent({}, () => {
return <Island component={Foo} />; // Rendered on the server, hydrated on the client
})- GraphQL queries should be typed
- The initial value should be serialized in the server response, to skip the initial query on the client
Outcomes
- POC
- Tickets to consolidate if accepted
Notes
I'm currently investigating this in Luxe