# \#web

**URL:** https://community.apollographql.com/tag/web/3.md

[Latest](https://community.apollographql.com/latest.md) · [Categories](https://community.apollographql.com/categories.md) · [Tags](https://community.apollographql.com/tags.md)

---

## [Advice on Connecting Apollo Subscriptions via Shared Worker](https://community.apollographql.com/t/advice-on-connecting-apollo-subscriptions-via-shared-worker/9111)

<div class="topic-metadata">

**Author:** [@Bobby\_Chao](https://community.apollographql.com/u/Bobby_Chao)\
**Replies:** 3\
**Last updated:** [September 30, 2026, 4:42am UTC](https://community.apollographql.com/t/advice-on-connecting-apollo-subscriptions-via-shared-worker/9111 "2026-09-30T04:42:23Z")

</div>

Hi everyone, We’re currently using Apollo GraphQL Client in our frontend React.js application, and we subscribe to backend events using GraphQL subscription queries over WebSocket. We’re now exploring ways to reduce the…

---

## [Should BatchHttpLink exclude mutations by default?](https://community.apollographql.com/t/should-batchhttplink-exclude-mutations-by-default/10058)

<div class="topic-metadata">

**Author:** [@markl](https://community.apollographql.com/u/markl)\
**Replies:** 4\
**Last updated:** [September 17, 2026, 5:15pm UTC](https://community.apollographql.com/t/should-batchhttplink-exclude-mutations-by-default/10058 "2026-09-17T17:15:41Z")

</div>

BatchHttpLink’s default batchKey function does not distinguish between queries and mutations. Both get grouped into the same batch. I understand that in theory it’s a valid transport level optimization since the server a…

---

## [Embedded Sandbox is broken everywhere, including Apollo's own docs — sandbox.embed.apollographql.com](https://community.apollographql.com/t/embedded-sandbox-is-broken-everywhere-including-apollos-own-docs-sandbox-embed-apollographql-com/9977)

<div class="topic-metadata">

**Author:** [@deebugger](https://community.apollographql.com/u/deebugger)\
**Replies:** 3\
**Last updated:** [August 5, 2026, 10:21am UTC](https://community.apollographql.com/t/embedded-sandbox-is-broken-everywhere-including-apollos-own-docs-sandbox-embed-apollographql-com/9977 "2026-08-05T10:21:54Z")

</div>

Hello! The embedded Sandbox iframe fails to render for any browser with a cold cache. It boots, then a lazy route chunk 404s, the React ErrorBoundary catches it, and you’re left with a blank panel. This reproduces on y…

---

## [React router client loader and preloadQuery](https://community.apollographql.com/t/react-router-client-loader-and-preloadquery/9838)

<div class="topic-metadata">

**Author:** [@YoavSh](https://community.apollographql.com/u/YoavSh)\
**Replies:** 1\
**Last updated:** [May 13, 2026, 2:10pm UTC](https://community.apollographql.com/t/react-router-client-loader-and-preloadquery/9838 "2026-05-13T14:10:06Z")

</div>

Hi I have a react router 7 application (data mode) with Apollo client. I have a route loader where I use preloadQuery to fetch the pages’s data and I also use preloadQuery.toPromise(queryRef) to prevent route transitio…

---

## [Many repeat cache watches causing memory/CPU overhead](https://community.apollographql.com/t/many-repeat-cache-watches-causing-memory-cpu-overhead/9556)

<div class="topic-metadata">

**Author:** [@jcostello](https://community.apollographql.com/u/jcostello)\
**Replies:** 20\
**Last updated:** [October 19, 2026, 3:39pm UTC](https://community.apollographql.com/t/many-repeat-cache-watches-causing-memory-cpu-overhead/9556 "2026-10-19T15:39:08Z")

</div>

I’m working on a large project that can render up to 5,000 items on a page at once. In general, we try to follow fragment colocation, where a component uses useFragment to declare its data requirements. However, we’re se…

---

## [Two quries with some common objects causing infinite api calls](https://community.apollographql.com/t/two-quries-with-some-common-objects-causing-infinite-api-calls/9747)

<div class="topic-metadata">

**Author:** [@Muhammad\_Abdul\_Rehma](https://community.apollographql.com/u/Muhammad_Abdul_Rehma)\
**Replies:** 0\
**Last updated:** [March 10, 2026, 10:03am UTC](https://community.apollographql.com/t/two-quries-with-some-common-objects-causing-infinite-api-calls/9747 "2026-03-10T10:03:25Z")

</div>

I can see this topic was opened with the same issue, i tired everything from the docs, but I didn’t find any solution. Any luck if anyone founds solution for this?

---

## [Remove references from queries after eviction and before repopulation (from another query)](https://community.apollographql.com/t/remove-references-from-queries-after-eviction-and-before-repopulation-from-another-query/9714)

<div class="topic-metadata">

**Author:** [@Mateo\_Jaouen](https://community.apollographql.com/u/Mateo_Jaouen)\
**Replies:** 1\
**Last updated:** [February 11, 2026, 10:30pm UTC](https://community.apollographql.com/t/remove-references-from-queries-after-eviction-and-before-repopulation-from-another-query/9714 "2026-02-11T22:30:04Z")

</div>

Hello, I’m facing an issue with references while moving a “file” from a folder to a subfolder. When I move an “file“ I first evict it from the cache (then invalidate the destination folder queries), the object disappea…

---

## [Incorrect mutation caller return type — \`data\` is nullish when \`errorPolicy\` is \`none\`](https://community.apollographql.com/t/incorrect-mutation-caller-return-type-data-is-nullish-when-errorpolicy-is-none/9667)

<div class="topic-metadata">

**Author:** [@SimpleCreations](https://community.apollographql.com/u/SimpleCreations)\
**Replies:** 2\
**Last updated:** [January 23, 2026, 4:19pm UTC](https://community.apollographql.com/t/incorrect-mutation-caller-return-type-data-is-nullish-when-errorpolicy-is-none/9667 "2026-01-23T16:19:52Z")

</div>

Consider the following example: const \[createPost\] = useMutation(CreatePostDocument); const handleSubmit = async () =\> { const { data } = await createPost({ variables: { text: 'abc' } }); if (data != null) …

---

## [useFragment requires concrete \_\_typename for interface types](https://community.apollographql.com/t/usefragment-requires-concrete-typename-for-interface-types/9657)

<div class="topic-metadata">

**Author:** [@jcostello](https://community.apollographql.com/u/jcostello)\
**Replies:** 1\
**Last updated:** [January 23, 2026, 12:49pm UTC](https://community.apollographql.com/t/usefragment-requires-concrete-typename-for-interface-types/9657 "2026-01-23T12:49:20Z")

</div>

I’m working on a large project that is currently running into some friction when using useFragment with types that implement interfaces. Context: Our app preloads data in a custom package and components then read that …

---

## [Tutorial Series: Headless Craft CMS with GraphQL and React](https://community.apollographql.com/t/tutorial-series-headless-craft-cms-with-graphql-and-react/9652)

<div class="topic-metadata">

**Author:** [@kmgdev](https://community.apollographql.com/u/kmgdev)\
**Replies:** 0\
**Last updated:** [January 20, 2026, 6:17pm UTC](https://community.apollographql.com/t/tutorial-series-headless-craft-cms-with-graphql-and-react/9652 "2026-01-20T18:17:42Z")

</div>

Hi everyone, I’ve recently completed a tutorial series on setting up a React site using Apollo Client to query a headless Craft CMS backend. It’s designed for frontend devs coming from traditional CMS development looking…

---

## [Router Auth Directives + Token Refresh Clarification](https://community.apollographql.com/t/router-auth-directives-token-refresh-clarification/9502)

<div class="topic-metadata">

**Author:** [@mjfaga](https://community.apollographql.com/u/mjfaga)\
**Replies:** 4\
**Last updated:** [January 9, 2026, 7:49pm UTC](https://community.apollographql.com/t/router-auth-directives-token-refresh-clarification/9502 "2026-01-09T19:49:06Z")

</div>

Hey folks - hoping there is some good guidance or clarification that someone can give me regarding the JWT Authentication flows built into the router. I want to use the Routers @authenticated/@requiresScopes directives …

---

## [How to optimize graphql queries for interactive web apps?](https://community.apollographql.com/t/how-to-optimize-graphql-queries-for-interactive-web-apps/9616)

<div class="topic-metadata">

**Author:** [@carla-bruni88](https://community.apollographql.com/u/carla-bruni88)\
**Replies:** 0\
**Last updated:** [January 1, 2026, 7:01pm UTC](https://community.apollographql.com/t/how-to-optimize-graphql-queries-for-interactive-web-apps/9616 "2026-01-01T19:01:10Z")

</div>

Hi everyone, I’m working on a web app that integrates dynamic content and interactive features. One challenge I’ve faced recently involves optimizing graphql queries for performance, especially when handling media-heavy…

---

## [Apollo Server Tracing](https://community.apollographql.com/t/apollo-server-tracing/9602)

<div class="topic-metadata">

**Author:** [@Bilaaaaaaaaal](https://community.apollographql.com/u/Bilaaaaaaaaal)\
**Replies:** 0\
**Last updated:** [December 22, 2025, 11:09am UTC](https://community.apollographql.com/t/apollo-server-tracing/9602 "2025-12-22T11:09:09Z")

</div>

Hello guys! I have an express application that runs a graphql server. This was running on apollo server 3 and express 4. I recently upgraded it to Apollo server 5 and express 5. I also had to upgrade my dataloader/batchi…

---

## [Managing performance and rate limits with complex queries](https://community.apollographql.com/t/managing-performance-and-rate-limits-with-complex-queries/9588)

<div class="topic-metadata">

**Author:** [@valerie31](https://community.apollographql.com/u/valerie31)\
**Replies:** 0\
**Last updated:** [December 15, 2025, 8:51pm UTC](https://community.apollographql.com/t/managing-performance-and-rate-limits-with-complex-queries/9588 "2025-12-15T20:51:06Z")

</div>

Hi everyone, I’m running into some performance issues with Apollo when certain clients send deeply nested or repeated queries. Even with caching in place, I’m seeing spikes in execution time and occasional rate-limit pr…

---

## [Cache performance issues on v3 (maybeBroadcastWatch)](https://community.apollographql.com/t/cache-performance-issues-on-v3-maybebroadcastwatch/9570)

<div class="topic-metadata">

**Author:** [@cain](https://community.apollographql.com/u/cain)\
**Replies:** 2\
**Last updated:** [December 4, 2025, 11:05pm UTC](https://community.apollographql.com/t/cache-performance-issues-on-v3-maybebroadcastwatch/9570 "2025-12-04T23:05:42Z")

</div>

Hi all, we have a react web app and its performance is degrading quite a bit, im trying to debug and understand why. The issue seems to be related to how many components are listing for cache updates of a query. I know …

---

## [Recommended Way to Persist Pagination Offset Value Between Components?](https://community.apollographql.com/t/recommended-way-to-persist-pagination-offset-value-between-components/9563)

<div class="topic-metadata">

**Author:** [@kmgdev](https://community.apollographql.com/u/kmgdev)\
**Replies:** 1\
**Last updated:** [November 18, 2025, 5:50pm UTC](https://community.apollographql.com/t/recommended-way-to-persist-pagination-offset-value-between-components/9563 "2025-11-18T17:50:48Z")

</div>

I’ve got a super basic offset pagination setup on a blog website. There’s a homepage component with an entry listing, and a single page component for the post detail. I’m using offsetLimitPagination() to load new entries…

---

## [SSR has 100% miss on AST print cache](https://community.apollographql.com/t/ssr-has-100-miss-on-ast-print-cache/9475)

<div class="topic-metadata">

**Author:** [@joeyciechanowicz](https://community.apollographql.com/u/joeyciechanowicz)\
**Replies:** 0\
**Last updated:** [October 2, 2025, 10:34am UTC](https://community.apollographql.com/t/ssr-has-100-miss-on-ast-print-cache/9475 "2025-10-02T10:34:27Z")

</div>

When server-side rendering I’ve noticed that a lot of memory allocation and CPU time is spent printing the query AST. The printer does have a cache, but you get a 100% cache miss rate as the query gets transformed by th…

---

## [What's the proper way to write subscribeToMore.updateQuery in Typescript?](https://community.apollographql.com/t/whats-the-proper-way-to-write-subscribetomore-updatequery-in-typescript/9455)

<div class="topic-metadata">

**Author:** [@mzbyszynski](https://community.apollographql.com/u/mzbyszynski)\
**Replies:** 4\
**Last updated:** [September 29, 2025, 3:53pm UTC](https://community.apollographql.com/t/whats-the-proper-way-to-write-subscribetomore-updatequery-in-typescript/9455 "2025-09-29T15:53:11Z")

</div>

I’m running into some TypeScript challenges after upgrading to Apollo Client 4.x. I’m following this example provided in the docs for using subscribeToMore() from useQuery() The code example has this: const unsubscr…

---

## [Apollo Client 4.0 is Here!](https://community.apollographql.com/t/apollo-client-4-0-is-here/9429)

<div class="topic-metadata">

**Author:** [@jerelmiller](https://community.apollographql.com/u/jerelmiller)\
**Replies:** 0\
**Last updated:** [September 3, 2025, 5:26pm UTC](https://community.apollographql.com/t/apollo-client-4-0-is-here/9429 "2025-09-03T17:26:46Z")

</div>

:high\_voltage: Apollo Client 4.0 is Live Apollo Client 4.0 is here, a leaner, cleaner GraphQL client built for modern JavaScript and TypeScript. This release makes apps faster, bundles smaller, and the developer experie…

---

## [The hook useQuery is not supported in React Server Components, but only in Client Components](https://community.apollographql.com/t/the-hook-usequery-is-not-supported-in-react-server-components-but-only-in-client-components/9422)

<div class="topic-metadata">

**Author:** [@kmgdev](https://community.apollographql.com/u/kmgdev)\
**Replies:** 2\
**Last updated:** [September 1, 2025, 9:42pm UTC](https://community.apollographql.com/t/the-hook-usequery-is-not-supported-in-react-server-components-but-only-in-client-components/9422 "2025-09-01T21:42:27Z")

</div>

Been trying to get set up in a fresh Next.js install. I’m using the Next.js integration and followed the setup instructions on the Github page. When I try to call useQuery I get this Next.js error: The hook useQuery i…

---

## [How to evict all related queries from cache that reference ids of deleted entities](https://community.apollographql.com/t/how-to-evict-all-related-queries-from-cache-that-reference-ids-of-deleted-entities/9408)

<div class="topic-metadata">

**Author:** [@Temzasse](https://community.apollographql.com/u/Temzasse)\
**Replies:** 7\
**Last updated:** [August 29, 2025, 4:38pm UTC](https://community.apollographql.com/t/how-to-evict-all-related-queries-from-cache-that-reference-ids-of-deleted-entities/9408 "2025-08-29T16:38:56Z")

</div>

Hi :waving\_hand:t2: I’m trying to optimize the way we update the Apollo cache after deleting various entities. The Apollo Client docs have rather good examples about this topic but manually managing the cache can be qui…

---

## [Cookie authentication for ApolloClient and NextJS app router](https://community.apollographql.com/t/cookie-authentication-for-apolloclient-and-nextjs-app-router/9387)

<div class="topic-metadata">

**Author:** [@ty-nielson](https://community.apollographql.com/u/ty-nielson)\
**Replies:** 2\
**Last updated:** [August 19, 2025, 7:51am UTC](https://community.apollographql.com/t/cookie-authentication-for-apolloclient-and-nextjs-app-router/9387 "2025-08-19T07:51:50Z")

</div>

I am working with a NextJS project that needs to access a graphql API. I am using the nextjs app router and am trying to follow the best practices outlined here apollo-client-integrations/packages/nextjs/README.md at 1af…

---

## [Apollo cache js object transformation on read](https://community.apollographql.com/t/apollo-cache-js-object-transformation-on-read/9382)

<div class="topic-metadata">

**Author:** [@itaied](https://community.apollographql.com/u/itaied)\
**Replies:** 2\
**Last updated:** [August 19, 2025, 4:44am UTC](https://community.apollographql.com/t/apollo-cache-js-object-transformation-on-read/9382 "2025-08-19T04:44:17Z")

</div>

hey all i’m using apollo graphql react sdk in my clojurescript project i’m having an issue with the caching mechanism and the transformation of js object to cljs objects. basically, in cljs i’m applying the function “…

---

## [Avoiding fallback component after initial load with \`useSuspenseQuery\` when automatically refreshing data](https://community.apollographql.com/t/avoiding-fallback-component-after-initial-load-with-usesuspensequery-when-automatically-refreshing-data/9279)

<div class="topic-metadata">

**Author:** [@SeerUK](https://community.apollographql.com/u/SeerUK)\
**Replies:** 2\
**Last updated:** [July 9, 2025, 12:39pm UTC](https://community.apollographql.com/t/avoiding-fallback-component-after-initial-load-with-usesuspensequery-when-automatically-refreshing-data/9279 "2025-07-09T12:39:23Z")

</div>

I’m trying to make a React context provider which runs a query, and then allows it’s children to render. I was thinking it’d be nice to do this with Suspense, because I could have other providers that load essential dat…

---

## [How to Mock Apollo Client GraphQL Calls for E2E Testing in Next.js v12?](https://community.apollographql.com/t/how-to-mock-apollo-client-graphql-calls-for-e2e-testing-in-next-js-v12/9233)

<div class="topic-metadata">

**Author:** [@Yash\_Boura](https://community.apollographql.com/u/Yash_Boura)\
**Replies:** 0\
**Last updated:** [June 24, 2025, 3:41am UTC](https://community.apollographql.com/t/how-to-mock-apollo-client-graphql-calls-for-e2e-testing-in-next-js-v12/9233 "2025-06-24T03:41:56Z")

</div>

Hi everyone, I’m working on a Next.js v12 application that uses Apollo Client for GraphQL operations, and I’m struggling with mocking GraphQL calls during E2E testing while maintaining a single Apollo Client instance. M…

---

## [preloadQuery with Tanstack Router loader](https://community.apollographql.com/t/preloadquery-with-tanstack-router-loader/9100)

<div class="topic-metadata">

**Author:** [@BrennenRocks](https://community.apollographql.com/u/BrennenRocks)\
**Replies:** 11\
**Last updated:** [May 23, 2025, 1:07pm UTC](https://community.apollographql.com/t/preloadquery-with-tanstack-router-loader/9100 "2025-05-23T13:07:16Z")

</div>

I am attempting to use preloadQuery with the Tanstack router loader function loader: ({ params }) =\> { return preloadQuery(DealQuery, { variables: { dealId: params.dealId }, }); }, Then in the compone…

---

## [How to use @defer in Apollo GraphQL mutations](https://community.apollographql.com/t/how-to-use-defer-in-apollo-graphql-mutations/8938)

<div class="topic-metadata">

**Author:** [@Varun\_Bezzam](https://community.apollographql.com/u/Varun_Bezzam)\
**Replies:** 4\
**Last updated:** [April 24, 2025, 8:09pm UTC](https://community.apollographql.com/t/how-to-use-defer-in-apollo-graphql-mutations/8938 "2025-04-24T20:09:28Z")

</div>

Hi! I have a Strawberry GraphQL server that supports sending deferred responses to my Apollo client-based frontend, and queries with deferred fields are working as expected. From this relevant PR and reading the latest c…

---

## [Increased query complexity when using fragment colocation](https://community.apollographql.com/t/increased-query-complexity-when-using-fragment-colocation/8928)

<div class="topic-metadata">

**Author:** [@Omar\_Ayman](https://community.apollographql.com/u/Omar_Ayman)\
**Replies:** 1\
**Last updated:** [April 16, 2025, 9:40am UTC](https://community.apollographql.com/t/increased-query-complexity-when-using-fragment-colocation/8928 "2025-04-16T09:40:51Z")

</div>

if I have a query like query Posts { posts { id title description } } and extract some fields to a fragment like this query Posts { posts { id title ... Description } } fragment Descrip…

---

## [Cache performance debugging](https://community.apollographql.com/t/cache-performance-debugging/8881)

<div class="topic-metadata">

**Author:** [@daronimo](https://community.apollographql.com/u/daronimo)\
**Replies:** 3\
**Last updated:** [April 14, 2025, 4:45pm UTC](https://community.apollographql.com/t/cache-performance-debugging/8881 "2025-04-14T16:45:02Z")

</div>

Hey all - Following up in this forum after speaking in person with some members of your team last week. We were wondering if there was any general advice for how to debug or instrument the Apollo Client cache performanc…

---

## [Cache data loss warning on fully normalized query](https://community.apollographql.com/t/cache-data-loss-warning-on-fully-normalized-query/8749)

<div class="topic-metadata">

**Author:** [@jhgrund](https://community.apollographql.com/u/jhgrund)\
**Replies:** 4\
**Last updated:** [March 31, 2025, 9:40am UTC](https://community.apollographql.com/t/cache-data-loss-warning-on-fully-normalized-query/8749 "2025-03-31T09:40:39Z")

</div>

Hey :slight\_smile: We have a schema, where part of it is type User implements Node { id: ID! fullName: String reports: \[Report!\]! } type Report { id: ID! name: String! } union MutationDeleteReportResult = B…

[Next page](https://community.apollographql.com/tag/web/3.md?match_all_tags=true&page=1&tags%5B%5D=web)
