Skip to content

Commit

Permalink
more logs
Browse files Browse the repository at this point in the history
  • Loading branch information
AlecAivazis committed Oct 19, 2023
1 parent 9e238f9 commit 784a488
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 0 additions & 6 deletions packages/houdini-react/src/plugin/codegen/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ export const on_render =
return new Response('not found', { status: 404 })
}
try {
const {
readable,
injectToStream,
Expand Down Expand Up @@ -114,10 +112,6 @@ export const on_render =
} else {
return new Response(readable)
}
} catch (err) {
console.error(err)
return new Response('internal server error', { status: 500 })
}
}
export function createServerAdapter(options) {
Expand Down
5 changes: 5 additions & 0 deletions packages/houdini-react/src/runtime/routing/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ function usePageData({
// to use loading any missing artifacts or the page component.

// group the necessary based on wether we have their artifact or not
console.log('documents', targetPage.documents)
const missing_artifacts: string[] = []
const found_artifacts: Record<string, QueryArtifact> = {}
for (const key of Object.keys(targetPage.documents)) {
Expand Down Expand Up @@ -356,6 +357,8 @@ function usePageData({
// if we don't have the query, load it
if (!data_cache.has(artifact.name)) {
load_query({ id: artifact.name, artifact })
} else {
console.log('skipping', artifact.name)
}
}
}
Expand Down Expand Up @@ -519,10 +522,12 @@ 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)
const store_ref = useRouterContext().data_cache.get(name)! as unknown as DocumentStore<
_Data,
_Input
>
console.log('storeRef', store_ref)
// get the live data from the store
const [{ data }, observer] = useDocumentStore<_Data, _Input>({
artifact: store_ref.artifact,
Expand Down

0 comments on commit 784a488

Please sign in to comment.