Skip to content

Commit

Permalink
Merge branch 'main' into jerel/require-sha-snapshot-release
Browse files Browse the repository at this point in the history
  • Loading branch information
jerelmiller authored Apr 22, 2024
2 parents 919808e + f6de059 commit 64809a3
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 15 deletions.
9 changes: 4 additions & 5 deletions ROADMAP.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 🔮 Apollo Client Roadmap

**Last updated: 2024-04-15**
**Last updated: 2024-04-22**

For up to date release notes, refer to the project's [Changelog](https://github.com/apollographql/apollo-client/blob/main/CHANGELOG.md).

Expand All @@ -13,14 +13,13 @@ For up to date release notes, refer to the project's [Changelog](https://github.

---

## [3.10.0](https://github.com/apollographql/apollo-client/milestone/33) - April 18th, 2024
## [3.10.0](https://github.com/apollographql/apollo-client/milestone/33) - April 24th, 2024

- RC target: April 2nd, 2024
- Core `watchFragment` API to provide `useFragment`-like functionality for non-React envs
- schema-driven testing utilities

## Upcoming features

- Core `watchFragment` API to provide `useFragment`-like functionality for non-React envs
- schema-driven testing utilities
- Data masking
- Introduce a suspenseful `useFragment` that will suspend when the data is not yet loaded
- leaner client (under alternate entry point)
Expand Down
6 changes: 3 additions & 3 deletions docs/source/data/queries.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -370,17 +370,17 @@ new ApolloClient({
options,
// The original value of options.fetchPolicy, before nextFetchPolicy was
// applied for the first time.
initialPolicy,
initialFetchPolicy,
// The ObservableQuery associated with this client.watchQuery call.
observable,
}
) {
// When variables change, the default behavior is to reset
// options.fetchPolicy to context.initialPolicy. If you omit this logic,
// options.fetchPolicy to context.initialFetchPolicy. If you omit this logic,
// your nextFetchPolicy function can override this default behavior to
// prevent options.fetchPolicy from changing in this case.
if (reason === 'variables-changed') {
return initialPolicy;
return initialFetchPolicy;
}

if (
Expand Down
2 changes: 1 addition & 1 deletion docs/source/development-testing/static-typing.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Below, we'll guide you through installing and configuring GraphQL Code Generator
To get started using GraphQL Code Generator, begin by installing the following packages (using Yarn or NPM):

```bash
yarn add -D typescript @graphql-codegen/cli @graphql-codegen/client-preset @graphql-typed-document-node/core
yarn add -D typescript graphql @graphql-codegen/cli @graphql-codegen/client-preset @graphql-typed-document-node/core
```

Next, we'll create a configuration file for GraphQL Code Generator, named [`codegen.ts`](https://www.the-guild.dev/graphql/codegen/docs/config-reference/codegen-config), at the root of our project:
Expand Down
27 changes: 22 additions & 5 deletions docs/source/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,46 @@ title: Introduction to Apollo Client

import { Link } from 'gatsby';

**Apollo Client** is a comprehensive state management library for JavaScript that enables you to manage both local and remote data with GraphQL. Use it to fetch, cache, and modify application data, all while automatically updating your UI.
**Apollo Client** is a comprehensive state management library for JavaScript. It enables you to manage both local and remote data with GraphQL. Use it to fetch, cache, and modify application data, all while automatically updating your UI.

Apollo Client helps you structure code in an economical, predictable, and declarative way that's consistent with modern development practices. The core `@apollo/client` library provides built-in integration with React, and the larger Apollo community maintains [integrations for other popular view layers](#community-integrations).

<p>
<ButtonLink
size="lg"
colorScheme="indigo"
href="./get-started/"
colorScheme="navy"
>
Get started!
</ButtonLink>
</p>

## Features
## Core features

Some of Apollo Client's core capabilities include:

- **Declarative data fetching:** Write a query and receive data without manually tracking loading states.
- **Normalized request and response caching:** Boost performance by responding almost immediately to queries with cached data.
- **Excellent developer experience:** Enjoy helpful tooling for TypeScript, Chrome / Firefox devtools, and VS Code.
- **Designed for modern React:** Take advantage of the latest React features, such as hooks.
- **Incrementally adoptable:** Drop Apollo into any JavaScript app and incorporate it feature by feature.
- **Designed for modern React:** Take advantage of the latest React features, such as hooks and Suspense.
- **Incrementally adoptable:** Drop Apollo Client into any JavaScript app and incorporate it feature by feature.
- **Universally compatible:** Use any build setup and any GraphQL API.
- **Community driven:** Share knowledge with thousands of developers in the GraphQL community.

## GraphOS supported features

Apollo Client works seamlessly with these GraphOS router supported features:

- Receiving data for specific fields incrementally with the [`@defer` directive](/graphos/operations/defer)
- Real-time updates via [GraphQL subscriptions](/graphos/operations/subscriptions)
- Safelisting with [persisted queries](/graphos/operations/persisted-queries)

<Note>

Apollo Client also supports `@defer` and GraphQL subscription implementations outside of GraphOS.

</Note>

## Recommended docs

After you [get started](./get-started/), check out the full Apollo Client documentation in the navigation on the left.
Expand Down
2 changes: 1 addition & 1 deletion src/core/__tests__/fetchPolicies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1274,7 +1274,7 @@ describe("nextFetchPolicy", () => {

// The nextFetchPolicy function we provided always returnes cache-first,
// even when context.reason is variables-changed (which by default
// resets the fetchPolicy to context.initialPolicy), so cache-first is
// resets the fetchPolicy to context.initialFetchPolicy), so cache-first is
// still what we see here.
expect(observable.options.fetchPolicy).toBe("cache-first");
} else if (count === 3) {
Expand Down

0 comments on commit 64809a3

Please sign in to comment.