Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: adds useBackgroundQuery and useReadQuery docs #10880

Merged
merged 13 commits into from
May 17, 2023

Conversation

alessbell
Copy link
Contributor

@alessbell alessbell commented May 15, 2023

Closes #10874.

Checklist:

  • If this PR contains changes to the library itself (not necessary for e.g. docs updates), please include a changeset (see CONTRIBUTING.md)
  • If this PR is a new feature, please reference an issue where a consensus about the design was reached (not necessary for small changes)
  • Make sure all of the significant new logic is covered by tests

@changeset-bot
Copy link

changeset-bot bot commented May 15, 2023

⚠️ No Changeset found

Latest commit: 6ea0990

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.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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

@github-actions
Copy link
Contributor

github-actions bot commented May 15, 2023

size-limit report 📦

Path Size
dist/apollo-client.min.cjs 33.66 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/main.cjs" 42.38 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/index.js" 33.46 KB (0%)
import { ApolloProvider } from "dist/react/index.js" 917 B (0%)
import { useQuery } from "dist/react/index.js" 24.95 KB (0%)
import { useLazyQuery } from "dist/react/index.js" 25.25 KB (0%)
import { useMutation } from "dist/react/index.js" 23.49 KB (0%)
import { useSubscription } from "dist/react/index.js" 2.43 KB (0%)
import { useFragment_experimental } from "dist/react/index.js" 1.84 KB (0%)

@netlify
Copy link

netlify bot commented May 15, 2023

Deploy Preview for apollo-client-docs ready!

Name Link
🔨 Latest commit 6ea0990
🔍 Latest deploy log https://app.netlify.com/sites/apollo-client-docs/deploys/64652887b2dfc70008082416
😎 Deploy Preview https://deploy-preview-10880--apollo-client-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

import UseBackgroundQueryResult from '../../../shared/useBackgroundQuery-result.mdx';
import UseReadQueryResult from '../../../shared/useReadQuery-result.mdx';

## `useBackgroundQuery_experimental` and `useReadQuery_experimental`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

NB: we haven't had a hook graduate from experimental to the big leagues yet - at least since adding this page to the docs! When that happens, we should:

  • remove experimental from named export and docs
  • cut + paste into docs/source/api/react/hooks.mdx
  • add a redirect in docs/source/_redirects, e.g. /docs/react/api/react/hooks-experimental/#usefragment_experimental /docs/react/api/react/hooks/#usefragment

Copy link
Member

Choose a reason for hiding this comment

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

Good call! I think our PR to shift from alpha -> beta will be dropping the _experimental suffix, so let's make this part of that planned work.

Copy link
Member

@jerelmiller jerelmiller left a comment

Choose a reason for hiding this comment

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

Spotted a few typos and had some small suggestions for some areas. Thanks for putting this together!

docs/shared/useBackgroundQuery-options.mdx Outdated Show resolved Hide resolved
docs/shared/useBackgroundQuery-result.mdx Outdated Show resolved Hide resolved
docs/shared/useBackgroundQuery-result.mdx Outdated Show resolved Hide resolved
docs/shared/useSuspenseQuery-options.mdx Show resolved Hide resolved
docs/shared/useSuspenseQuery-options.mdx Outdated Show resolved Hide resolved
docs/source/api/react/hooks-experimental.mdx Outdated Show resolved Hide resolved
docs/source/api/react/hooks-experimental.mdx Outdated Show resolved Hide resolved
docs/source/api/react/hooks-experimental.mdx Outdated Show resolved Hide resolved
docs/source/api/react/hooks-experimental.mdx Outdated Show resolved Hide resolved
docs/source/api/react/hooks-experimental.mdx Outdated Show resolved Hide resolved
@alessbell
Copy link
Contributor Author

Back-to-back docs PRs, thanks for another review here @jerelmiller! This one should be good to go 🙌

Copy link
Member

@jerelmiller jerelmiller left a comment

Choose a reason for hiding this comment

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

Looks 💯 🔥 🔥 🔥 . Thanks for putting this together!

@alessbell alessbell merged commit 5ab0563 into main May 17, 2023
@alessbell alessbell deleted the issue-10874-useBackgroundQuery-useReadQuery-docs branch May 17, 2023 19:25
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[docs] useBackgroundQuery and useReadQuery
2 participants