@apollo/client 3.13.8 → 3.13.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @apollo/client
2
2
 
3
+ ## 3.13.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [#12804](https://github.com/apollographql/apollo-client/pull/12804) [`32c9aa9`](https://github.com/apollographql/apollo-client/commit/32c9aa9215fab72e9ab68ee71198ce242157f855) Thanks [@phryneas](https://github.com/phryneas)! - Fix a possible race condition on queries that were reobserved before they were subscribed to the first time.
8
+
3
9
  ## 3.13.8
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -1,41 +1,65 @@
1
- <div align="center">
1
+ <header>
2
+ <div align="center">
3
+ <a href="https://www.apollographql.com?utm_medium=github&utm_source=apollographql_apollo-client&utm_campaign=readme"><img src="https://raw.githubusercontent.com/apollographql/apollo-client-devtools/main/assets/apollo-wordmark.svg" height="100" alt="Apollo Logo"></a>
4
+ </div>
5
+ <h1 align="center">Apollo Client</h1>
6
+
7
+ **The industry-leading GraphQL client for TypeScript, JavaScript, React, Vue, Angular, and more.** Apollo Client delivers powerful caching, intuitive APIs, and comprehensive developer tools to accelerate your app development.
2
8
 
3
- <p>
4
- <a href="https://www.apollographql.com/"><img src="https://raw.githubusercontent.com/apollographql/apollo-client-devtools/main/assets/apollo-wordmark.svg" height="100" alt="Apollo Client"></a>
5
- </p>
6
- <h1>Apollo Client</h1>
9
+ ➡️ [**Get Started with Apollo Client →**](https://www.apollographql.com/docs/react/get-started?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme)
10
+
11
+ <div align="center">
7
12
 
8
13
  [![npm version](https://badge.fury.io/js/%40apollo%2Fclient.svg)](https://badge.fury.io/js/%40apollo%2Fclient) [![Build Status](https://circleci.com/gh/apollographql/apollo-client.svg?style=svg)](https://circleci.com/gh/apollographql/apollo-client) [![Join the community](https://img.shields.io/discourse/status?label=Join%20the%20community&server=https%3A%2F%2Fcommunity.apollographql.com)](https://community.apollographql.com)
9
14
 
10
- </div>
15
+ </div>
16
+ </header>
11
17
 
12
- ---
18
+ ## ❓ Why Choose Apollo Client?
13
19
 
14
- **Announcement:**
15
- Join 1000+ engineers at GraphQL Summit 2025 by Apollo for talks, workshops, and office hours. Oct 6-8, 2025 in San Francisco. [Get your pass here ->](https://www.apollographql.com/graphql-summit-2025?utm_campaign=2025-03-04_graphql-summit-github-announcement&utm_medium=github&utm_source=apollo-server)
20
+ ✅ Zero-config caching - Intelligent caching out of the box<br>
21
+ Framework agnostic - Works with React, Vue, Angular, Svelte, and vanilla JavaScript<br>
22
+ ✅ TypeScript-first - Full type safety and IntelliSense support<br>
23
+ ✅ React 19 ready - Supports Suspense, RSC, Compiler, and more<br>
24
+ ✅ Production-tested - Powers countless apps worldwide that serve millions of end users<br>
25
+
26
+ ## 🚀 Quick Start
27
+
28
+ ```sh
29
+ npm install @apollo/client graphql
30
+ ```
16
31
 
17
- ---
32
+ ## 💡 Resources
18
33
 
19
- Apollo Client is a fully-featured caching GraphQL client with integrations for React, Angular, and more. It allows you to easily build UI components that fetch data via GraphQL.
34
+ | Resource | Description | Link |
35
+ | ----- | ----- | ----- |
36
+ | **Getting Started Guide** | Complete setup and first query | [Start Here →](https://www.apollographql.com/docs/react/get-started?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) |
37
+ | **Full Documentation** | Comprehensive guides and examples | [Read Docs →](https://www.apollographql.com/docs/react?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) |
38
+ | **API Reference** | Complete API documentation | [Browse API →](https://www.apollographql.com/docs/react/api/apollo-client?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) |
39
+ | **VS Code Extension** | Enhanced development experience | [Install Extension →](https://marketplace.visualstudio.com/items?itemName=apollographql.vscode-apollo) |
40
+ | **DevTools** | Debug your GraphQL apps | [Chrome](https://chrome.google.com/webstore/detail/apollo-client-devtools/jdkknkkbebbapilgoeccciglkfbmbnfm) \| [Firefox](https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/) |
41
+ | **Free Course** | Learn GraphQL and Apollo Client | [Take Course →](https://odyssey.apollographql.com?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) |
20
42
 
21
- Apollo Client aims to comply with the [Working Draft of the GraphQL specification](https://spec.graphql.org/draft/).
43
+ ## 💬 Get Support
22
44
 
23
- | ☑️ Apollo Client User Survey |
24
- | :----- |
25
- | What do you like best about Apollo Client? What needs to be improved? Please tell us by taking a [one-minute survey](https://docs.google.com/forms/d/e/1FAIpQLSczNDXfJne3ZUOXjk9Ursm9JYvhTh1_nFTDfdq3XBAFWCzplQ/viewform?usp=pp_url&entry.1170701325=Apollo+Client&entry.204965213=Readme). Your responses will help us understand Apollo Client usage and allow us to serve you better. |
45
+ **Need help?** We're here for you:
46
+
47
+ * [**Community Forum**](https://community.apollographql.com?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) \- Q\&A and discussions
48
+ * [**GraphQL Discord**](https://discord.graphql.org) \- Real-time chat with the community
26
49
 
27
- ## Documentation
50
+ ## 🧑‍🚀 About Apollo
28
51
 
29
- All Apollo Client documentation, including React integration articles and helpful recipes, can be found at: <br/>
30
- [https://www.apollographql.com/docs/react/](https://www.apollographql.com/docs/react/)
52
+ Deliver tomorrow's roadmap today with our comprehensive suite of API orchestration tools:
31
53
 
32
- The Apollo Client API reference can be found at: <br/>
33
- [https://www.apollographql.com/docs/react/api/apollo-client/](https://www.apollographql.com/docs/react/api/apollo-client/)
54
+ * [**Apollo Client**](https://www.apollographql.com/docs/react?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) \- Type-safe apps with GraphQL-powered on-device caching ([React](https://www.apollographql.com/docs/react?utm_medium=github&utm_source=apollographql_apollo-client&utm_campaign=readme), [iOS](https://www.apollographql.com/docs/ios?utm_medium=github&utm_source=apollographql_apollo-client&utm_campaign=readme), [Kotlin](https://www.apollographql.com/docs/kotlin?utm_medium=github&utm_source=apollographql_apollo-client&utm_campaign=readme))
55
+ * [**Apollo Connectors**](https://www.apollographql.com/graphos/apollo-connectors?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) \- Compose all your GraphQL and REST APIs into one GraphQL endpoint
56
+ * [**Apollo MCP Server**](https://www.apollographql.com/apollo-mcp-server?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) \- AI needs APIs. The fastest way to ship reliable AI experiences
57
+ * [**Apollo Router**](https://www.apollographql.com/docs/router?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) \- Scale your APIs seamlessly with GraphQL Federation, Security, Auth, and more
58
+ * [**GraphOS**](https://www.apollographql.com/graphos?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) \- Deploy, manage, govern, and explore your APIs ([start for free, no credit card needed](https://www.apollographql.com/pricing?utm_medium=github&utm_source=apollographql_apollo-client&utm_campaign=readme))
34
59
 
35
- Learn how to use Apollo Client with self-paced hands-on training on Odyssey, Apollo's official learning platform: <br/>
36
- [https://odyssey.apollographql.com/](https://odyssey.apollographql.com/)
60
+ [**Explore the Complete Apollo Platform →**](https://www.apollographql.com/?utm_source=github&utm_medium=apollographql-_apollo-client&utm_campaign=readme)
37
61
 
38
- ## Maintainers
62
+ ## 🛠️ Maintained by
39
63
 
40
64
  |Name|Username|
41
65
  |---|---|
@@ -43,15 +67,40 @@ Learn how to use Apollo Client with self-paced hands-on training on Odyssey, Apo
43
67
  |Jerel Miller|[@jerelmiller](https://github.com/jerelmiller)|
44
68
  |Lenz Weber-Tronic|[@phryneas](https://github.com/phryneas)|
45
69
 
46
- ## Who is Apollo?
70
+ ## 🗺️ Roadmap
71
+
72
+ We regularly update our [public roadmap](https://github.com/apollographql/apollo-client/blob/main/ROADMAP.md) with the status of our work-in-progress and upcoming features.
73
+
74
+ ## 📣 Tell us what you think
75
+
76
+ | ☑️ Apollo Client User Survey |
77
+ | :----- |
78
+ | What do you like best about Apollo Client? What needs to be improved? Please tell us by taking a [one-minute survey](https://docs.google.com/forms/d/e/1FAIpQLSczNDXfJne3ZUOXjk9Ursm9JYvhTh1_nFTDfdq3XBAFWCzplQ/viewform?usp=pp_url&entry.1170701325=Apollo+Client&entry.204965213=Readme). Your responses will help us understand Apollo Client usage and allow us to serve you better. |
79
+
80
+ ## 🗓️ Events
81
+
82
+ Join these live events to meet other GraphQL users and learn more:
83
+
84
+ 🎪 [**GraphQL Summit 2025**](https://summit.graphql.com?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme)
85
+ Oct 6-8, 2025 • San Francisco
86
+ *1000+ engineers, talks, workshops, and office hours*
87
+
88
+ 🌟 [**GraphQLConf 2025**](https://graphql.org/conf/2025)
89
+ Sep 8-10, 2025 • Amsterdam
90
+ *Celebrating 10 Years of GraphQL*
91
+
92
+ [**View All Events →**](https://www.apollographql.com/events?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme)
93
+
94
+ ## 🏆 Contributing
95
+
96
+ Thank you for your interest in submitting a Pull Request to Apollo Client! Read our [guidelines](https://github.com/apollographql/apollo-client/blob/main/CONTRIBUTING.md) first, and don't hesitate to get in touch.
97
+
98
+ **New to open source?** Check out our [**Good First Issues**](https://github.com/apollographql/apollo-client/issues?q=is%3Aopen%20label%3A%22%3Abooks%3A%20good-first-issue%22) to get started.
47
99
 
48
- [Apollo](https://apollographql.com/) builds open-source tools and commercial services to make application development easier, better, and accessible to more people. We help you ship faster with:
100
+ ## 🤝 Code of Conduct
49
101
 
50
- - [GraphOS](https://www.apollographql.com/graphos) - The platform for building, managing, and scaling a supergraph: a unified network of your organization's microservices and their data sources—all composed into a single distributed API.
51
- - [Apollo Federation](https://www.apollographql.com/federation) – The industry-standard open architecture for building a distributed graph. Use Apollo’s gateway to compose a unified graph from multiple subgraphs, determine a query plan, and route requests across your services.
52
- - [Apollo Client](https://github.com/apollographql/apollo-client) – The most popular GraphQL client for the web. Apollo also builds and maintains [Apollo iOS](https://github.com/apollographql/apollo-ios) and [Apollo Kotlin](https://github.com/apollographql/apollo-kotlin).
53
- - [Apollo Server](https://github.com/apollographql/apollo-server) – A production-ready JavaScript GraphQL server that connects to any microservice, API, or database. Compatible with all popular JavaScript frameworks and deployable in serverless environments.
102
+ Please read our [Code of Conduct](https://community.apollographql.com/faq). This applies to any space run by Apollo, including our GitHub repositories, the Apollo GraphOS Discord, the Apollo GraphQL Forum. The Code of Conduct reflects our commitment to making the Apollo Community a welcoming and safe space in which individuals can interact.
54
103
 
55
- ## Learn how to build with Apollo
104
+ ## 🪪 License
56
105
 
57
- Check out the [Odyssey](https://odyssey.apollographql.com/) learning platform, the perfect place to start your GraphQL journey with videos and interactive code challenges. Join the [Apollo Community](https://community.apollographql.com/) to interact with and get technical help from the GraphQL community.
106
+ Source code in this repository is available under the terms of the MIT License. Read the full text [here](https://github.com/apollographql/apollo-client/blob/main/LICENSE).
package/apollo-client.cjs CHANGED
@@ -31,7 +31,7 @@ function _interopNamespace(e) {
31
31
  var equal__default = /*#__PURE__*/_interopDefaultLegacy(equal);
32
32
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
33
33
 
34
- var version = "3.13.8";
34
+ var version = "3.13.9";
35
35
 
36
36
  function maybe(thunk) {
37
37
  try {
@@ -5172,10 +5172,7 @@ var ObservableQuery = (function (_super) {
5172
5172
  var _this = this;
5173
5173
  var startedInactive = ObservableQuery.inactiveOnCreation.getValue();
5174
5174
  _this = _super.call(this, function (observer) {
5175
- if (startedInactive) {
5176
- queryManager["queries"].set(_this.queryId, queryInfo);
5177
- startedInactive = false;
5178
- }
5175
+ _this._getOrCreateQuery();
5179
5176
  try {
5180
5177
  var subObserver = observer._subscription._observer;
5181
5178
  if (subObserver && !subObserver.error) {
@@ -5204,6 +5201,13 @@ var ObservableQuery = (function (_super) {
5204
5201
  _this.observers = new Set();
5205
5202
  _this.subscriptions = new Set();
5206
5203
  _this.dirty = false;
5204
+ _this._getOrCreateQuery = function () {
5205
+ if (startedInactive) {
5206
+ queryManager["queries"].set(_this.queryId, queryInfo);
5207
+ startedInactive = false;
5208
+ }
5209
+ return _this.queryManager.getOrCreateQuery(_this.queryId);
5210
+ };
5207
5211
  _this.queryInfo = queryInfo;
5208
5212
  _this.queryManager = queryManager;
5209
5213
  _this.waitForOwnResult = skipCacheDataFor(options.fetchPolicy);
@@ -5556,7 +5560,7 @@ var ObservableQuery = (function (_super) {
5556
5560
  return options.fetchPolicy;
5557
5561
  };
5558
5562
  ObservableQuery.prototype.fetch = function (options, newNetworkStatus, query) {
5559
- var queryInfo = this.queryManager.getOrCreateQuery(this.queryId);
5563
+ var queryInfo = this._getOrCreateQuery();
5560
5564
  queryInfo.setObservableQuery(this);
5561
5565
  return this.queryManager["fetchConcastWithInfo"](queryInfo, options, newNetworkStatus, query);
5562
5566
  };