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

attempt at preventing feuds in combination with a read function #11430

Draft
wants to merge 2 commits into
base: release-3.9
Choose a base branch
from

Conversation

phryneas
Copy link
Member

This might address the feud showcased in #7028 - I'll have to give it a PR release and a spin.

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

Copy link

changeset-bot bot commented Dec 14, 2023

🦋 Changeset detected

Latest commit: b4100b2

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

Copy link
Contributor

github-actions bot commented Dec 14, 2023

size-limit report 📦

Path Size
dist/apollo-client.min.cjs 37.66 KB (+0.07% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/main.cjs" 44.21 KB (+0.04% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/main.cjs" (production) 42.69 KB (+0.05% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/index.js" 32.88 KB (+0.07% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/index.js" (production) 31.57 KB (+0.05% 🔺)
import { ApolloProvider } from "dist/react/index.js" 1.24 KB (0%)
import { ApolloProvider } from "dist/react/index.js" (production) 1.22 KB (0%)
import { useQuery } from "dist/react/index.js" 4.33 KB (0%)
import { useQuery } from "dist/react/index.js" (production) 4.15 KB (0%)
import { useLazyQuery } from "dist/react/index.js" 4.64 KB (0%)
import { useLazyQuery } from "dist/react/index.js" (production) 4.45 KB (0%)
import { useMutation } from "dist/react/index.js" 2.61 KB (0%)
import { useMutation } from "dist/react/index.js" (production) 2.59 KB (0%)
import { useSubscription } from "dist/react/index.js" 2.29 KB (0%)
import { useSubscription } from "dist/react/index.js" (production) 2.25 KB (0%)
import { useSuspenseQuery } from "dist/react/index.js" 4.29 KB (0%)
import { useSuspenseQuery } from "dist/react/index.js" (production) 3.7 KB (0%)
import { useBackgroundQuery } from "dist/react/index.js" 3.87 KB (0%)
import { useBackgroundQuery } from "dist/react/index.js" (production) 3.29 KB (0%)
import { useLoadableQuery } from "dist/react/index.js" 4.11 KB (0%)
import { useLoadableQuery } from "dist/react/index.js" (production) 3.52 KB (0%)
import { useReadQuery } from "dist/react/index.js" 3.01 KB (0%)
import { useReadQuery } from "dist/react/index.js" (production) 2.95 KB (0%)
import { useFragment } from "dist/react/index.js" 2.11 KB (0%)
import { useFragment } from "dist/react/index.js" (production) 2.06 KB (0%)

@phryneas
Copy link
Member Author

/release:pr

Copy link
Contributor

A new release has been made for this PR. You can install it with npm i @apollo/client@0.0.0-pr-11430-20231214142926.

@phryneas
Copy link
Member Author

It seems to fix the example given by @marco2216 CodeSandBox, but at this point this will need more investigating if there are any negative side effects.

@phryneas phryneas linked an issue Dec 14, 2023 that may be closed by this pull request
Comment on lines -2400 to -2416
} else if (count === 3) {
expect(result).toEqual({
loading: true,
networkStatus: NetworkStatus.loading,
data: {
info: {},
},
partial: true,
});
} else if (count === 4) {
expect(result).toEqual({
loading: false,
networkStatus: NetworkStatus.ready,
data: {
info: {},
},
});
Copy link
Member Author

Choose a reason for hiding this comment

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

It's probably good that this isn't happening anymore - that doesn't seem like desirable behaviour?

@marco2216
Copy link

Any idea when this PR will be merged? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Infinite loop caused by Type Policy with read function
2 participants