Skip to content

Conversation

jerelmiller
Copy link
Member

Fixes #12946

Removes the operationType key in the payload sent by GraphQLWsLink which was causing issues with HotChocolate.

Copy link

changeset-bot bot commented Sep 29, 2025

🦋 Changeset detected

Latest commit: 70fd5f7

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

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 Sep 29, 2025

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

commit: 70fd5f7

Copy link
Contributor

github-actions bot commented Sep 29, 2025

size-limit report 📦

Path Size
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (CJS) 42.91 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (production) (CJS) 37.78 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" 32.69 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (production) 26.87 KB (0%)
import { ApolloProvider } from "@apollo/client/react" 5.91 KB (0%)
import { ApolloProvider } from "@apollo/client/react" (production) 994 B (0%)
import { useQuery } from "@apollo/client/react" 7.35 KB (0%)
import { useQuery } from "@apollo/client/react" (production) 2.39 KB (0%)
import { useLazyQuery } from "@apollo/client/react" 7.11 KB (0%)
import { useLazyQuery } from "@apollo/client/react" (production) 2.16 KB (0%)
import { useMutation } from "@apollo/client/react" 6.47 KB (0%)
import { useMutation } from "@apollo/client/react" (production) 1.52 KB (0%)
import { useSubscription } from "@apollo/client/react" 6.79 KB (0%)
import { useSubscription } from "@apollo/client/react" (production) 1.82 KB (0%)
import { useSuspenseQuery } from "@apollo/client/react" 8.58 KB (0%)
import { useSuspenseQuery } from "@apollo/client/react" (production) 3.63 KB (0%)
import { useBackgroundQuery } from "@apollo/client/react" 8.34 KB (0%)
import { useBackgroundQuery } from "@apollo/client/react" (production) 3.4 KB (0%)
import { useLoadableQuery } from "@apollo/client/react" 8.31 KB (0%)
import { useLoadableQuery } from "@apollo/client/react" (production) 3.39 KB (0%)
import { useReadQuery } from "@apollo/client/react" 6.6 KB (0%)
import { useReadQuery } from "@apollo/client/react" (production) 1.65 KB (0%)
import { useFragment } from "@apollo/client/react" 6.66 KB (0%)
import { useFragment } from "@apollo/client/react" (production) 1.71 KB (0%)

@apollo-librarian
Copy link

apollo-librarian bot commented Sep 29, 2025

✅ Docs preview has no changes

The preview was not built because there were no changes.

Build ID: 56709918740f98def7df7072
Build Logs: View logs

const { operationType, ...request } = operation;
return this.client.subscribe<ApolloLink.Result>(
{ ...operation, query: print(operation.query) },
{ ...request, query: print(operation.query) },
Copy link
Member

Choose a reason for hiding this comment

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

What do you think - should we just be a bit more specific here and only pass in known properties?

      const { query, variables, operationName, extensions} = operation;
      return this.client.subscribe<ApolloLink.Result>(
        { variables, operationName, extensions, query: print(query) },

@github-actions github-actions bot added the auto-cleanup 🤖 label Sep 30, 2025
@jerelmiller jerelmiller merged commit 5b4f36a into main Sep 30, 2025
44 checks passed
@jerelmiller jerelmiller deleted the jerel/fix-payload-ws-link branch September 30, 2025 18:16
@github-actions github-actions bot mentioned this pull request Sep 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[4.0] Breaks websocket subscriptions
2 participants