@apollo/client-react-streaming
Advanced tools
Comparing version 0.0.0-commit-4fc1615 to 0.0.0-commit-84f7c8d
@@ -9,5 +9,5 @@ import * as _apollo_client_index_js from '@apollo/client/index.js'; | ||
* | ||
* Ensures that during RSC for an ongoing request, you can always | ||
* access the same instance of ApolloClient, while always returning | ||
* a new instance of different requests. | ||
* Ensures that you can always access the same instance of ApolloClient | ||
* during RSC for an ongoing request, while always returning | ||
* a new instance for different requests. | ||
* | ||
@@ -32,5 +32,5 @@ * @example | ||
/** | ||
* Ensures that during RSC for an ongoing request, you can always | ||
* access the same instance of ApolloClient, while always returning | ||
* a new instance of different requests. | ||
* Ensures that you can always access the same instance of ApolloClient | ||
* during RSC for an ongoing request, while always returning | ||
* a new instance for different requests. | ||
* | ||
@@ -298,4 +298,6 @@ * @example | ||
* Information about the current package and it's export names, for use in error messages. | ||
* | ||
* @internal | ||
*/ | ||
protected info: { | ||
static readonly info: { | ||
pkg: string; | ||
@@ -302,0 +304,0 @@ client: string; |
@@ -0,3 +1,5 @@ | ||
const built_for_other = true; | ||
export { built_for_other }; | ||
//# sourceMappingURL=out.js.map | ||
//# sourceMappingURL=empty.js.map |
@@ -249,4 +249,6 @@ import * as _apollo_client_index_js from '@apollo/client/index.js'; | ||
* Information about the current package and it's export names, for use in error messages. | ||
* | ||
* @internal | ||
*/ | ||
protected info: { | ||
static readonly info: { | ||
pkg: string; | ||
@@ -253,0 +255,0 @@ client: string; |
@@ -206,4 +206,6 @@ import { ApolloLink, InMemoryCache as InMemoryCache$1, ApolloProvider, Observable as Observable$1, ApolloClient as ApolloClient$1 } from '@apollo/client/index.js'; | ||
* Information about the current package and it's export names, for use in error messages. | ||
* | ||
* @internal | ||
*/ | ||
info = bundle; | ||
static info = bundle; | ||
constructor(options) { | ||
@@ -213,3 +215,3 @@ super(options); | ||
throw new Error( | ||
`When using \`InMemoryCache\` in streaming SSR, you must use the \`${this.info.cache}\` export provided by \`"${this.info.pkg}"\`.` | ||
`When using \`InMemoryCache\` in streaming SSR, you must use the \`${this.constructor.info.cache}\` export provided by \`"${this.constructor.info.pkg}"\`.` | ||
); | ||
@@ -340,2 +342,3 @@ } | ||
...queryInfo.options, | ||
query: queryManager.transform(queryInfo.options.query), | ||
context: { | ||
@@ -390,5 +393,6 @@ ...queryInfo.options.context, | ||
} | ||
const built_for_browser = true; | ||
export { ApolloClient, DataTransportContext, AccumulateMultipartResponsesLink as DebounceMultipartResponsesLink, InMemoryCache, RemoveMultipartDirectivesLink, SSRMultipartLink, WrapApolloProvider, resetApolloSingletons }; | ||
export { ApolloClient, DataTransportContext, AccumulateMultipartResponsesLink as DebounceMultipartResponsesLink, InMemoryCache, RemoveMultipartDirectivesLink, SSRMultipartLink, WrapApolloProvider, built_for_browser, resetApolloSingletons }; | ||
//# sourceMappingURL=out.js.map | ||
//# sourceMappingURL=index.browser.js.map |
@@ -8,5 +8,5 @@ import * as _apollo_client_index_js from '@apollo/client/index.js'; | ||
* | ||
* Ensures that during RSC for an ongoing request, you can always | ||
* access the same instance of ApolloClient, while always returning | ||
* a new instance of different requests. | ||
* Ensures that you can always access the same instance of ApolloClient | ||
* during RSC for an ongoing request, while always returning | ||
* a new instance for different requests. | ||
* | ||
@@ -31,5 +31,5 @@ * @example | ||
/** | ||
* Ensures that during RSC for an ongoing request, you can always | ||
* access the same instance of ApolloClient, while always returning | ||
* a new instance of different requests. | ||
* Ensures that you can always access the same instance of ApolloClient | ||
* during RSC for an ongoing request, while always returning | ||
* a new instance for different requests. | ||
* | ||
@@ -247,4 +247,6 @@ * @example | ||
* Information about the current package and it's export names, for use in error messages. | ||
* | ||
* @internal | ||
*/ | ||
protected info: { | ||
static readonly info: { | ||
pkg: string; | ||
@@ -251,0 +253,0 @@ client: string; |
@@ -158,4 +158,6 @@ import { cache } from 'react'; | ||
* Information about the current package and it's export names, for use in error messages. | ||
* | ||
* @internal | ||
*/ | ||
info = bundle; | ||
static info = bundle; | ||
constructor(options) { | ||
@@ -165,3 +167,3 @@ super(options); | ||
throw new Error( | ||
`When using \`InMemoryCache\` in streaming SSR, you must use the \`${this.info.cache}\` export provided by \`"${this.info.pkg}"\`.` | ||
`When using \`InMemoryCache\` in streaming SSR, you must use the \`${this.constructor.info.cache}\` export provided by \`"${this.constructor.info.pkg}"\`.` | ||
); | ||
@@ -174,5 +176,6 @@ } | ||
}; | ||
const built_for_rsc = true; | ||
export { ApolloClient, AccumulateMultipartResponsesLink as DebounceMultipartResponsesLink, InMemoryCache, RemoveMultipartDirectivesLink, SSRMultipartLink, registerApolloClient }; | ||
export { ApolloClient, AccumulateMultipartResponsesLink as DebounceMultipartResponsesLink, InMemoryCache, RemoveMultipartDirectivesLink, SSRMultipartLink, built_for_rsc, registerApolloClient }; | ||
//# sourceMappingURL=out.js.map | ||
//# sourceMappingURL=index.rsc.js.map |
@@ -249,4 +249,6 @@ import * as _apollo_client_index_js from '@apollo/client/index.js'; | ||
* Information about the current package and it's export names, for use in error messages. | ||
* | ||
* @internal | ||
*/ | ||
protected info: { | ||
static readonly info: { | ||
pkg: string; | ||
@@ -253,0 +255,0 @@ client: string; |
@@ -223,4 +223,6 @@ import { ApolloLink, InMemoryCache as InMemoryCache$1, ApolloProvider, Observable as Observable$1, ApolloClient as ApolloClient$1 } from '@apollo/client/index.js'; | ||
* Information about the current package and it's export names, for use in error messages. | ||
* | ||
* @internal | ||
*/ | ||
info = bundle; | ||
static info = bundle; | ||
constructor(options) { | ||
@@ -230,3 +232,3 @@ super(options); | ||
throw new Error( | ||
`When using \`InMemoryCache\` in streaming SSR, you must use the \`${this.info.cache}\` export provided by \`"${this.info.pkg}"\`.` | ||
`When using \`InMemoryCache\` in streaming SSR, you must use the \`${this.constructor.info.cache}\` export provided by \`"${this.constructor.info.pkg}"\`.` | ||
); | ||
@@ -331,5 +333,6 @@ } | ||
} | ||
const built_for_ssr = true; | ||
export { ApolloClient, DataTransportContext, AccumulateMultipartResponsesLink as DebounceMultipartResponsesLink, InMemoryCache, RemoveMultipartDirectivesLink, SSRMultipartLink, WrapApolloProvider, resetApolloSingletons }; | ||
export { ApolloClient, DataTransportContext, AccumulateMultipartResponsesLink as DebounceMultipartResponsesLink, InMemoryCache, RemoveMultipartDirectivesLink, SSRMultipartLink, WrapApolloProvider, built_for_ssr, resetApolloSingletons }; | ||
//# sourceMappingURL=out.js.map | ||
//# sourceMappingURL=index.ssr.js.map |
@@ -38,9 +38,8 @@ import React from 'react'; | ||
* | ||
* - It does not have a way of keeping your connection open if your application already finished, but there are still ongoing queries that might need to be awaited transported over. | ||
* - It does not have a way of keeping your connection open if your application already finished, but there are still ongoing queries that might need to be transported over. | ||
* - This can happen if a component renders `useBackgroundQuery`, but does not read the `queryRef` with `useReadQuery` | ||
* - These "cut off" queries will be restarted in the Browser once the browser's `load` event happens | ||
* - These "cut off" queries will be restarted in the browser once the browser's `load` event happens | ||
* - If the `useInsertHtml` doesn't immediately flush data to the browser, the browser might already attain "newer" data through queries triggered by user interaction. | ||
* - This delayed behaviour is the case with the Next.js `ServerInsertedHTMLContext` and in the example Vite implementation. | ||
* - In this, case, older data from the server might overwrite newer data in the browser. | ||
* - This is minimized by simulating ongoing queries in the browser once the information of a started query is transported over. | ||
* - In this, case, older data from the server might overwrite newer data in the browser. This is minimized by simulating ongoing queries in the browser once the information of a started query is transported over. | ||
* If the browser would try to trigger the exact same query, query deduplication would make the browser wait for the server query to resolve instead. | ||
@@ -47,0 +46,0 @@ * - For more timing-related details, see https://github.com/apollographql/apollo-client-nextjs/pull/9 |
@@ -97,5 +97,6 @@ import React2, { useRef, useEffect, useCallback, useId, useMemo } from 'react'; | ||
} | ||
const built_for_browser = true; | ||
export { buildManualDataTransport, resetManualSSRApolloSingletons }; | ||
export { buildManualDataTransport, built_for_browser, resetManualSSRApolloSingletons }; | ||
//# sourceMappingURL=out.js.map | ||
//# sourceMappingURL=manual-transport.browser.js.map |
@@ -38,9 +38,8 @@ import React from 'react'; | ||
* | ||
* - It does not have a way of keeping your connection open if your application already finished, but there are still ongoing queries that might need to be awaited transported over. | ||
* - It does not have a way of keeping your connection open if your application already finished, but there are still ongoing queries that might need to be transported over. | ||
* - This can happen if a component renders `useBackgroundQuery`, but does not read the `queryRef` with `useReadQuery` | ||
* - These "cut off" queries will be restarted in the Browser once the browser's `load` event happens | ||
* - These "cut off" queries will be restarted in the browser once the browser's `load` event happens | ||
* - If the `useInsertHtml` doesn't immediately flush data to the browser, the browser might already attain "newer" data through queries triggered by user interaction. | ||
* - This delayed behaviour is the case with the Next.js `ServerInsertedHTMLContext` and in the example Vite implementation. | ||
* - In this, case, older data from the server might overwrite newer data in the browser. | ||
* - This is minimized by simulating ongoing queries in the browser once the information of a started query is transported over. | ||
* - In this, case, older data from the server might overwrite newer data in the browser. This is minimized by simulating ongoing queries in the browser once the information of a started query is transported over. | ||
* If the browser would try to trigger the exact same query, query deduplication would make the browser wait for the server query to resolve instead. | ||
@@ -47,0 +46,0 @@ * - For more timing-related details, see https://github.com/apollographql/apollo-client-nextjs/pull/9 |
@@ -150,5 +150,6 @@ import React, { useRef, useMemo, useId } from 'react'; | ||
} | ||
const built_for_ssr = true; | ||
export { buildManualDataTransport, resetManualSSRApolloSingletons }; | ||
export { buildManualDataTransport, built_for_ssr, resetManualSSRApolloSingletons }; | ||
//# sourceMappingURL=out.js.map | ||
//# sourceMappingURL=manual-transport.ssr.js.map |
{ | ||
"name": "@apollo/client-react-streaming", | ||
"version": "0.0.0-commit-4fc1615", | ||
"version": "0.0.0-commit-84f7c8d", | ||
"repository": { | ||
@@ -51,2 +51,3 @@ "url": "git+https://github.com/apollographql/apollo-client-nextjs" | ||
"react-server": "./dist/index.rsc.cjs", | ||
"edge-light": "./dist/index.ssr.cjs", | ||
"browser": "./dist/index.browser.cjs", | ||
@@ -58,2 +59,3 @@ "node": "./dist/index.ssr.cjs" | ||
"react-server": "./dist/index.rsc.js", | ||
"edge-light": "./dist/index.ssr.js", | ||
"browser": "./dist/index.browser.js", | ||
@@ -67,2 +69,3 @@ "node": "./dist/index.ssr.js" | ||
"react-server": "./dist/empty.cjs", | ||
"edge-light": "./dist/manual-transport.ssr.cjs", | ||
"browser": "./dist/manual-transport.browser.cjs", | ||
@@ -74,2 +77,3 @@ "node": "./dist/manual-transport.ssr.cjs" | ||
"react-server": "./dist/empty.js", | ||
"edge-light": "./dist/manual-transport.ssr.js", | ||
"browser": "./dist/manual-transport.browser.js", | ||
@@ -114,33 +118,33 @@ "node": "./dist/manual-transport.ssr.js" | ||
"devDependencies": { | ||
"@apollo/client": "^3.9.6", | ||
"@arethetypeswrong/cli": "0.13.6", | ||
"@microsoft/api-extractor": "^7.42.3", | ||
"@testing-library/react": "^14.2.1", | ||
"@total-typescript/shoehorn": "0.1.1", | ||
"@apollo/client": "3.9.9", | ||
"@arethetypeswrong/cli": "0.15.2", | ||
"@microsoft/api-extractor": "7.42.3", | ||
"@testing-library/react": "14.2.1", | ||
"@total-typescript/shoehorn": "0.1.2", | ||
"@tsconfig/recommended": "1.0.3", | ||
"@types/node": "20.11.5", | ||
"@types/react": "18.2.55", | ||
"@typescript-eslint/eslint-plugin": "^7.0.1", | ||
"@typescript-eslint/parser": "^7.0.1", | ||
"concurrently": "^8.2.2", | ||
"eslint": "8.56.0", | ||
"eslint-plugin-react": "7.33.2", | ||
"@types/node": "20.11.30", | ||
"@types/react": "18.2.67", | ||
"@typescript-eslint/eslint-plugin": "7.0.1", | ||
"@typescript-eslint/parser": "7.0.1", | ||
"concurrently": "8.2.2", | ||
"eslint": "8.57.0", | ||
"eslint-plugin-react": "7.34.1", | ||
"eslint-plugin-react-hooks": "4.6.0", | ||
"glob": "^10.3.10", | ||
"global-jsdom": "^24.0.0", | ||
"globstar": "^1.0.0", | ||
"glob": "10.3.10", | ||
"global-jsdom": "24.0.0", | ||
"globstar": "1.0.0", | ||
"graphql": "16.8.1", | ||
"jsdom": "^24.0.0", | ||
"jsdom": "24.0.0", | ||
"react": "18.3.0-canary-60a927d04-20240113", | ||
"react-error-boundary": "^4.0.13", | ||
"react-error-boundary": "4.0.13", | ||
"rimraf": "5.0.5", | ||
"superjson": "1.13.3", | ||
"ts-node": "10.9.2", | ||
"tsup": "8.0.1", | ||
"tsx": "^4.7.0", | ||
"typescript": "5.3.3", | ||
"vitest": "1.2.1" | ||
"tsup": "8.0.2", | ||
"tsx": "4.7.0", | ||
"typescript": "5.4.3", | ||
"vitest": "1.4.0" | ||
}, | ||
"peerDependencies": { | ||
"@apollo/client": "^3.9.0", | ||
"@apollo/client": "^3.9.6", | ||
"react": "^18" | ||
@@ -147,0 +151,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
502435
3925