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

watchFragment: forward additional options to diffOptions #11926

Merged
merged 6 commits into from
Jul 10, 2024

Conversation

phryneas
Copy link
Member

@phryneas phryneas commented Jul 4, 2024

fixes #11924

@phryneas phryneas requested a review from alessbell July 4, 2024 15:13
Copy link

changeset-bot bot commented Jul 4, 2024

🦋 Changeset detected

Latest commit: 9b4ead4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@apollo/client Patch

Not sure what this means? Click here to learn what changesets are.

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

@phryneas
Copy link
Member Author

phryneas commented Jul 4, 2024

/release:pr

Copy link
Contributor

github-actions bot commented Jul 4, 2024

A new release has been made for this PR. You can install it with:

npm i @apollo/client@0.0.0-pr-11926-20240704151615

Copy link
Contributor

github-actions bot commented Jul 4, 2024

size-limit report 📦

Path Size
dist/apollo-client.min.cjs 39.26 KB (+0.06% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/main.cjs" 48 KB (+0.04% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/main.cjs" (production) 45.53 KB (+0.04% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/index.js" 34.38 KB (+0.1% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/index.js" (production) 32.23 KB (+0.07% 🔺)
import { ApolloProvider } from "dist/react/index.js" 1.26 KB (0%)
import { ApolloProvider } from "dist/react/index.js" (production) 1.24 KB (0%)
import { useQuery } from "dist/react/index.js" 5.24 KB (0%)
import { useQuery } from "dist/react/index.js" (production) 4.31 KB (0%)
import { useLazyQuery } from "dist/react/index.js" 5.71 KB (0%)
import { useLazyQuery } from "dist/react/index.js" (production) 4.79 KB (0%)
import { useMutation } from "dist/react/index.js" 3.62 KB (0%)
import { useMutation } from "dist/react/index.js" (production) 2.85 KB (0%)
import { useSubscription } from "dist/react/index.js" 4.42 KB (0%)
import { useSubscription } from "dist/react/index.js" (production) 3.46 KB (0%)
import { useSuspenseQuery } from "dist/react/index.js" 5.5 KB (0%)
import { useSuspenseQuery } from "dist/react/index.js" (production) 4.16 KB (0%)
import { useBackgroundQuery } from "dist/react/index.js" 5 KB (0%)
import { useBackgroundQuery } from "dist/react/index.js" (production) 3.65 KB (0%)
import { useLoadableQuery } from "dist/react/index.js" 5.07 KB (0%)
import { useLoadableQuery } from "dist/react/index.js" (production) 3.72 KB (0%)
import { useReadQuery } from "dist/react/index.js" 3.39 KB (0%)
import { useReadQuery } from "dist/react/index.js" (production) 3.34 KB (0%)
import { useFragment } from "dist/react/index.js" 2.32 KB (0%)
import { useFragment } from "dist/react/index.js" (production) 2.27 KB (0%)

const query = this.getFragmentDoc(fragment, fragmentName);

const diffOptions: Cache.DiffOptions<TData, TVars> = {
...otherOptions,
Copy link
Member Author

Choose a reason for hiding this comment

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

to fix the reported problem, forwarding just variables is already enough, but it might be a good idea to forward all unspecified options. WDYT @alessbell?

Copy link
Contributor

Choose a reason for hiding this comment

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

The only other one is canonizeResults which is is deprecated and actually not used anywhere... I think we can remove it since it never did anything :/

Copy link

netlify bot commented Jul 4, 2024

Deploy Preview for apollo-client-docs ready!

Name Link
🔨 Latest commit 75b0efc
🔍 Latest deploy log https://app.netlify.com/sites/apollo-client-docs/deploys/6686bc1c26f89e000863e8ed
😎 Deploy Preview https://deploy-preview-11926--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 configuration.

Copy link

netlify bot commented Jul 4, 2024

Deploy Preview for apollo-client-docs ready!

Name Link
🔨 Latest commit 9cb268a
🔍 Latest deploy log https://app.netlify.com/sites/apollo-client-docs/deploys/6686bcced56a830008ead3ec
😎 Deploy Preview https://deploy-preview-11926--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 configuration.

Copy link
Contributor

@alessbell alessbell left a comment

Choose a reason for hiding this comment

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

Left one note about canonizeResults - there's no harm in spreading otherOptions but we should probably remove that anyways. Otherwise LGTM! 🚀

@alessbell alessbell merged commit 3dd6432 into release-3.11 Jul 10, 2024
32 of 36 checks passed
@alessbell alessbell deleted the pr/watchFragment-otherOptions branch July 10, 2024 19:25
@github-actions github-actions bot mentioned this pull request Jul 10, 2024
@github-actions github-actions bot mentioned this pull request Jul 22, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

useFragment throws an error when a fragment has the @include directive
2 participants