Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ObservableQuery documentation updates#12759

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
phryneas merged 29 commits intorelease-4.0frompr/docs-updates
Jul 17, 2025
Merged

Conversation

phryneas
Copy link
Member

Starting with these as they probably will cause the most required changes over in the docs base repo.

@phryneasphryneas requested a review froma team as acode ownerJuly 3, 2025 13:37
@changeset-botchangeset-bot
Copy link

changeset-botbot commentedJul 3, 2025
edited
Loading

⚠️ No Changeset found

Latest commit:7a4315d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go.If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-newpkg.pr.new
Copy link

pkg-pr-newbot commentedJul 3, 2025
edited
Loading

npm i https://pkg.pr.new/apollographql/apollo-client/@apollo/client@12759

commit:7a4315d

@github-actionsGitHub Actions
Copy link
Contributor

github-actionsbot commentedJul 3, 2025
edited
Loading

size-limit report 📦

PathSize
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (CJS)42.7 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (production) (CJS)37.78 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client"32.65 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (production)26.97 KB (0%)
import { ApolloProvider } from "@apollo/client/react"5.7 KB (0%)
import { ApolloProvider } from "@apollo/client/react" (production)960 B (0%)
import { useQuery } from "@apollo/client/react"6.99 KB (0%)
import { useQuery } from "@apollo/client/react" (production)2.23 KB (0%)
import { useLazyQuery } from "@apollo/client/react"6.89 KB (0%)
import { useLazyQuery } from "@apollo/client/react" (production)2.13 KB (0%)
import { useMutation } from "@apollo/client/react"6.22 KB (0%)
import { useMutation } from "@apollo/client/react" (production)1.48 KB (0%)
import { useSubscription } from "@apollo/client/react"6.57 KB (0%)
import { useSubscription } from "@apollo/client/react" (production)1.81 KB (0%)
import { useSuspenseQuery } from "@apollo/client/react"8.34 KB (0%)
import { useSuspenseQuery } from "@apollo/client/react" (production)3.62 KB (0%)
import { useBackgroundQuery } from "@apollo/client/react"8.13 KB (0%)
import { useBackgroundQuery } from "@apollo/client/react" (production)3.38 KB (0%)
import { useLoadableQuery } from "@apollo/client/react"8.07 KB (0%)
import { useLoadableQuery } from "@apollo/client/react" (production)3.36 KB (0%)
import { useReadQuery } from "@apollo/client/react"6.37 KB (0%)
import { useReadQuery } from "@apollo/client/react" (production)1.62 KB (0%)
import { useFragment } from "@apollo/client/react"6.45 KB (0%)
import { useFragment } from "@apollo/client/react" (production)1.7 KB (0%)

@@ -1,6 +0,0 @@
import { useMDXComponents } from "@mdx-js/react";
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

These files were not needed here anymore as they moved into the docs repo and have no functionality here

jerelmiller reacted with thumbs up emoji
Comment on lines +15 to +19
/**
* This namespace contains simplified interface versions of existing, complicated, types in Apollo Client.
* These interfaces are used in the documentation to provide a more readable
* and understandable API reference.
*/
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Adding a new namespace for general documentation

@@ -53,113 +54,144 @@ import { useApolloClient } from "./useApolloClient.js";
import { useSyncExternalStore } from "./useSyncExternalStore.js";

export declare namespace useQuery {
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

And some namespace nesting here:

  • useQuery.Base.Options anduseQuery.Base.Result are the parts ofuseQuery.Options anduseQuery.Result that can be expressed with an interface
  • useQuery.Options anduseQuery.Result stay as they are, but don't have the interfacey part inline, but pull in the base types defined directly next to them
  • useQuery.DocumentationTypes.Options anduseQuery.DocumentationTypes.Result are simplified versions of the types above (so no ternaries etc.) so they can be used for documentation purposes.

jerelmiller reacted with thumbs up emoji
@@ -1865,6 +1865,69 @@ describe("ApolloClient", () => {
await expect(stream).not.toEmitAnything();
});

it("`cache-only` reverts to an empty but successful result if data was previously there and suddenly went missing", async () => {
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

A few things I was documenting had no test cases that tested the documented behaviour, so I added them.

jerelmiller reacted with heart emoji
@apollo-librarian
Copy link

apollo-librarianbot commentedJul 16, 2025
edited
Loading

⚠️ Docs preview not attached to branch

The preview was not built because the PR's base branchrelease-4.0 is not in the list of sources.

An Apollo team member can comment one of the following commands to dictate which branch to attach the preview to:

  • !docs set-base-branch version-2.6
  • !docs set-base-branch main

Build ID: dc751a59b864e818c7ef71cf

Copy link
Member

@jerelmillerjerelmiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Had a few suggestions, but great start to the changes!

partial: boolean;
}

export interface RxjsObservable<TData> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Can we perhaps make thisObservableQueryRxjsObservable or something? I see thepipe andsubscribe types useApolloQueryResult which is very specific whileRxjsObservable can emit much more than just that type.

Just trying to think of a way to align those two 🤔

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This is just a blueprint to pull thepipe andsubscribe methods out of for the docs. That said, I'll move it over intoObservableQuery, into aObservableQuery.DocumentTypes namespace.

Copy link
MemberAuthor

@phryneasphryneasJul 17, 2025
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

jerelmiller reacted with hooray emoji
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

That's great. Thank you!

@phryneasphryneas changed the base branch frompr/changeset-annotation torelease-4.0July 17, 2025 12:14
@apollo-librarian
Copy link

🛠️ Docs preview building...

The preview is currently being built.

Build ID: 4848c548e4ff175086e9bbdd

phryneasand others added2 commitsJuly 17, 2025 14:30
Co-authored-by: Jerel Miller <jerelmiller@gmail.com>
@apollo-librarian
Copy link

🛠️ Docs preview building...

The preview is currently being built.

Build ID: 9bb20ba46b324b447805ae31

@apollo-librarian
Copy link

🛠️ Docs preview building...

The preview is currently being built.

Build ID: 6f01d90ea2863ee5bd76d987

@apollo-librarian
Copy link

🛠️ Docs preview building...

The preview is currently being built.

Build ID: c457ec0d5b226c329bd7b3c5

@phryneasphryneas merged commit9f9ed93 intorelease-4.0Jul 17, 2025
43 of 44 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@jerelmillerjerelmillerjerelmiller left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@phryneas@jerelmiller

[8]ページ先頭

©2009-2025 Movatter.jp