-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Description
In node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]/node_modules/@apollo/experimental-nextjs-app-support/dist/ssr/index.ssr.js
import { useContext } from 'react';
import { buildManualDataTransport } from '@apollo/client-react-streaming/manual-transport';
export { resetManualSSRApolloSingletons as resetNextSSRApolloSingletons } from '@apollo/client-react-streaming/manual-transport';
import { WrapApolloProvider, ApolloClient } from '@apollo/client-react-streaming';
export { DebounceMultipartResponsesLink, InMemoryCache as NextSSRInMemoryCache, RemoveMultipartDirectivesLink, SSRMultipartLink } from '@apollo/client-react-streaming';
import { ServerInsertedHTMLContext } from 'next/navigation.js';
export { useBackgroundQuery, useFragment, useQuery, useReadQuery, useSuspenseQuery } from '@apollo/client/index.js';
// src/ApolloNextAppProvider.ts
// src/bundleInfo.ts
var bundle = {
pkg: "@apollo/experimental-nextjs-app-support/ssr",
client: "NextSSRApolloClient",
cache: "NextSSRInMemoryCache"
};
// src/ApolloNextAppProvider.ts
var ApolloNextAppProvider = /* @__PURE__ */ WrapApolloProvider(
buildManualDataTransport({
useInsertHtml() {
const insertHtml = useContext(ServerInsertedHTMLContext);
if (!insertHtml) {
throw new Error(
"ApolloNextAppProvider cannot be used outside of the Next App Router!"
);
}
return insertHtml;
}
})
);
ApolloNextAppProvider.info = bundle;
var NextSSRApolloClient = class extends ApolloClient {
/**
* Information about the current package and it's export names, for use in error messages.
*
* @internal
*/
static info = bundle;
};
export { ApolloNextAppProvider, NextSSRApolloClient };
//# sourceMappingURL=out.js.map
//# sourceMappingURL=index.ssr.js.map
NextSSRInMemoryCache is not exported.
I am using version 0.9.1
Metadata
Metadata
Assignees
Labels
No labels