-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds support for
useBackgroundQuery
and useReadQuery
in Streaming…
… SSR (#38)
- Loading branch information
Showing
24 changed files
with
303 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
"use client"; | ||
|
||
export default function Error(error: { toString(): string }) { | ||
return <p>Error: {error.toString()}</p>; | ||
export default function Error({ | ||
error, | ||
reset, | ||
}: { | ||
error: Error; | ||
reset: () => void; | ||
}) { | ||
return <p>Error: {error.message}</p>; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { Poll } from "./poll-cc"; | ||
import { PollWrapper } from "./poll-cc"; | ||
|
||
export const dynamic = "force-dynamic"; | ||
|
||
export default async function Home() { | ||
return <Poll />; | ||
return <PollWrapper />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,22 @@ | ||
import { SuperJSONResult } from "superjson/dist/types"; | ||
import { RehydrationCache, ResultsCache } from "./types"; | ||
import { | ||
RehydrationCache, | ||
ResultsCache, | ||
BackgroundQueriesCache, | ||
} from "./types"; | ||
import type { DataTransport } from "./dataTransport"; | ||
|
||
declare global { | ||
interface Window { | ||
[ApolloRehydrationCache]?: RehydrationCache; | ||
[ApolloResultCache]?: ResultsCache; | ||
[ApolloSSRDataTransport]?: DataTransport<SuperJSONResult>; | ||
[ApolloBackgroundQueryTransport]?: BackgroundQueriesCache; | ||
} | ||
} | ||
export const ApolloRehydrationCache = Symbol.for("ApolloRehydrationCache"); | ||
export const ApolloResultCache = Symbol.for("ApolloResultCache"); | ||
export const ApolloSSRDataTransport = Symbol.for("ApolloSSRDataTransport"); | ||
export const ApolloBackgroundQueryTransport = Symbol.for( | ||
"ApolloBackgroundQueryTransport" | ||
); |
Oops, something went wrong.