Skip to content

prevent merging into supertype field policies #12750

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

Merged
merged 4 commits into from
Jun 27, 2025

Conversation

phryneas
Copy link
Member

@phryneas phryneas commented Jun 27, 2025

Fixes #12749

@phryneas phryneas requested a review from jerelmiller June 27, 2025 13:32
Copy link

changeset-bot bot commented Jun 27, 2025

🦋 Changeset detected

Latest commit: fafb3d8

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

pkg-pr-new bot commented Jun 27, 2025

npm i https://pkg.pr.new/@apollo/client@12750

commit: b012395

Copy link
Contributor

github-actions bot commented Jun 27, 2025

size-limit report 📦

Path Size
dist/apollo-client.min.cjs 41.67 KB (+0.02% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (CJS) 52.71 KB (+0.02% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (production) (CJS) 48.73 KB (+0.03% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" 36.9 KB (+0.04% 🔺)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (production) 33.91 KB (+0.03% 🔺)
import { ApolloProvider } from "@apollo/client/react" 1.26 KB (0%)
import { ApolloProvider } from "@apollo/client/react" (production) 1.24 KB (0%)
import { useQuery } from "@apollo/client/react" 10.54 KB (0%)
import { useQuery } from "@apollo/client/react" (production) 9.15 KB (0%)
import { useLazyQuery } from "@apollo/client/react" 9.74 KB (0%)
import { useMutation } from "@apollo/client/react" 3.95 KB (0%)
import { useMutation } from "@apollo/client/react" (production) 2.98 KB (0%)
import { useSubscription } from "@apollo/client/react" 4.56 KB (0%)
import { useSubscription } from "@apollo/client/react" (production) 3.61 KB (0%)
import { useSuspenseQuery } from "@apollo/client/react" 6.13 KB (0%)
import { useSuspenseQuery } from "@apollo/client/react" (production) 4.64 KB (0%)
import { useBackgroundQuery } from "@apollo/client/react" 5.62 KB (0%)
import { useBackgroundQuery } from "@apollo/client/react" (production) 4.13 KB (0%)
import { useLoadableQuery } from "@apollo/client/react" 5.69 KB (0%)
import { useLoadableQuery } from "@apollo/client/react" (production) 4.21 KB (0%)
import { useReadQuery } from "@apollo/client/react" 3.43 KB (0%)
import { useReadQuery } from "@apollo/client/react" (production) 3.38 KB (0%)
import { useFragment } from "@apollo/client/react" 2.55 KB (0%)
import { useFragment } from "@apollo/client/react" (production) 2.41 KB (0%)

@apollo-librarian
Copy link

apollo-librarian bot commented Jun 27, 2025

❌ Docs preview failed

The preview failed to build.

Build ID: 57f7632d008f7d99d32a687f

Errors

General: other side closed

@@ -632,21 +653,10 @@ export class Policies {

private getFieldPolicy(
typename: string | undefined,
fieldName: string,
createIfMissing: boolean
Copy link
Member Author

@phryneas phryneas Jun 27, 2025

Choose a reason for hiding this comment

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

createIfMissing: true was only passed in once, and with these changes it made more sense to solve this a different way, so I inlined that case there and modified it a bit.

@phryneas phryneas changed the base branch from main to release-3.13 June 27, 2025 13:59
@phryneas phryneas requested a review from a team as a code owner June 27, 2025 13:59
@phryneas phryneas changed the base branch from release-3.13 to release-3.14 June 27, 2025 14:02
@phryneas phryneas force-pushed the pr/prevent-merging-into-supertypes branch from 4350207 to 4dee1c1 Compare June 27, 2025 14:03
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.

💯

@@ -1,4 +1,3 @@
{
"dist/apollo-client.min.cjs": 42398,
"import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (production)": 34595
Copy link
Member

Choose a reason for hiding this comment

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

Was this line removed by accident?

@github-actions github-actions bot added the auto-cleanup 🤖 label Jun 27, 2025
@jerelmiller jerelmiller merged commit ecf3de1 into release-3.14 Jun 27, 2025
31 of 32 checks passed
@jerelmiller jerelmiller deleted the pr/prevent-merging-into-supertypes branch June 27, 2025 18:03
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 28, 2025
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.

For typePolicies super-type field policy will be overriden by child type field policy
2 participants