Skip to content

Commit

Permalink
log before suspense
Browse files Browse the repository at this point in the history
  • Loading branch information
AlecAivazis committed Feb 29, 2024
1 parent ac02336 commit 1a78ead
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/houdini-react/src/runtime/routing/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ function usePageData({
})
.then(() => {
data_cache.set(id, observer)

console.log('resolving', observer.state)
// if we are building up a stream (on the server), we want to add something
// to the client that resolves the pending request with the
// data that we just got
Expand Down Expand Up @@ -267,6 +267,7 @@ function usePageData({
// communicate with the client when we're done
const resolvable = { ...promise, resolve, reject }
if (!globalThis.window) {
console.log('setting ssr signal')
ssr_signals.set(id, resolvable)
}

Expand Down Expand Up @@ -431,7 +432,7 @@ export function RouterContextProvider({
artifact_cache,
component_cache,
data_cache,
ssr_signals: ssr_signals,
ssr_signals,
last_variables,
session,
}}
Expand Down Expand Up @@ -512,6 +513,7 @@ const VariableContext = React.createContext<GraphQLVariables>(null)
export function useQueryResult<_Data extends GraphQLObject, _Input extends GraphQLVariables>(
name: string
): [_Data | null, DocumentStore<_Data, _Input>] {
console.log('useQueryResult', name, useRouterContext().data_cache)
const store_ref = useRouterContext().data_cache.get(name)! as unknown as DocumentStore<
_Data,
_Input
Expand Down

0 comments on commit 1a78ead

Please sign in to comment.