Skip to content

Conversation

goncalooliveirasilva
Copy link

@goncalooliveirasilva goncalooliveirasilva commented Sep 5, 2025

This PR updates Part 8 documentation to align with Apollo Client v4.

  • Import ApolloProvider, useQuery, and useMutation from @apollo/client/react
  • Replace direct uri shortcut with link: new HttpLink({ uri }) (required in Apollo Client v4)
  • Improved one sentence for clarity in the setup instructions
  • Applied changes consistently across all relevant Part 8 files, including translations
  • Replace @apollo/server/express4 with @as-integrations/express (Express 5)
  • Replace useServer import path from graphql-ws/lib/use/ws to graphql-ws/use/ws

These updates match the current Apollo docs and prevent runtime errors in React 18 + Vite setups.

Note: I noticed another open PR that updates Apollo Client imports, but only in one file.
This PR applies the updates consistently across all relevant Part 8 files (including translations), also updates useMutation imports, and improves one sentence for clarity.

@goncalooliveirasilva goncalooliveirasilva changed the title Update Apollo Client imports and setup to v4 in Part 8 Update Apollo Client imports (ApolloProvider, useQuery, useMutation) and setup to v4 in Part 8 Sep 6, 2025
@goncalooliveirasilva goncalooliveirasilva changed the title Update Apollo Client imports (ApolloProvider, useQuery, useMutation) and setup to v4 in Part 8 Part 8: update Apollo Client imports (ApolloProvider, useQuery, useMutation) and setup to v4 Sep 6, 2025
@vejol vejol added the part 8 label Sep 14, 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.

2 participants