-
Notifications
You must be signed in to change notification settings - Fork 9
fix(deps): update dependency @apollo/client to v4 #1314
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
base: main
Are you sure you want to change the base?
Conversation
63995fa to
1792d55
Compare
b8495ab to
8e7076b
Compare
c5bd35d to
6f9a8a6
Compare
4e8a2ff to
bcfc111
Compare
bcfc111 to
5e6070c
Compare
5e6070c to
750141c
Compare
…LSQ/openhexa-app into renovate/major-apollo-graphql-packages # Conflicts: # frontend/package-lock.json # frontend/package.json
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
|
This PR is blocked. To upgrade to Apollo Client v4 we need to move away from generated hooks to client preset (see dotansimha/graphql-code-generator-community#1216 (comment)) I tried, but I can not manage to make the type inference to work (with |
|
Hello 👋 I'm Eddy from the GraphQL Codegen team. I notice the migration codemod may not have run correctly in this repo. For example, Could you please help me understand where your GraphQL operation files are? Were they in |
Hi @eddeee888 , Thanks for having a look at our codebase migration, we really appreciate it 😊
Yes, we are having trouble migrating.
GraphQL operations are in
As const in .tsx files openhexa-app/frontend/src/datasets/features/DatasetVersionFileSample/DatasetVersionFileSample.tsx Lines 91 to 103 in fbae842
And also in fragments of those .tsx files openhexa-app/frontend/src/core/features/SpotlightSearch/SpotlightSearch.tsx Lines 487 to 555 in 9f339c1
Hope you can provide us guidance for moving forward ! |
|
Apologies @yolanfery , I didn't see this earlier! I can see there are a mix of usages between
// openhexa-app/frontend/codegen.yml
overwrite: true
schema: "../backend/**/schema.graphql"
# documents: "src/**/!(*.generated).{ts,tsx,graphql}" temporarily disable this
generates:
# ...
# disable all other config above
src/:
documents: "src/**/*.graphql" # only targets `.graphql` files during codemod
preset: '@eddeee888/gcg-operation-location-migration'
presetConfig:
tsConfigFilePath: 'path-to-your/tsconfig.json'
targetStyle: 'near-operation-file'
gqlTag: {
name: 'gql'
importFrom: '@apollo/client'
importType: 'absolute'
},
hooksImportFrom: '@apollo/client/react', // Use @apollo/client for v3I'd recommend using
However, I have a question: does this have type-safety? It looks like it's just using the
|
Thanks for the help, we will try this way !
The result is untyped indeed, we will try and move away from this pattern
|

This PR contains the following updates:
^3.11.8->^4.0.0Release Notes
apollographql/apollo-client (@apollo/client)
v4.0.7Compare Source
Patch Changes
5b4f36aThanks @jerelmiller! - Don't sendoperationTypein the payload sent byGraphQLWsLink.v4.0.6Compare Source
Patch Changes
3b0d89bThanks @phryneas! - Fix a problem withfetchMorewhere the loading state wouldn't reset if the result wouldn't result in a data update.v4.0.5Compare Source
Patch Changes
e2fc385Thanks @phryneas! - Fix an invariance type error in theMockedResponsetype.v4.0.4Compare Source
Patch Changes
#12892
db8a04bThanks @jerelmiller! - Prevent unhandled rejections from the promise returned by calling themutatefunction from theuseMutationhook.#12899
5352c12Thanks @phryneas! - Fix an issue wheninvariantis called by external libraries when no dev error message handler is loaded.#12895
71f2517Thanks @jerelmiller! - SupportskipTokenwithuseQueryto provide a more type-safe way to skip query execution.Note: this change is provided as a patch within the 4.0 minor version because the changes to TypeScript validation with required variables in version 4.0 made using the
skipoption more difficult.#12900
c0d5be7Thanks @phryneas! - Use named exportequalinstead of default from"@​wry/equality"v4.0.3Compare Source
Patch Changes
#12887
6f6ca47Thanks @phryneas! - Fix accidental deep re-export from/reactout of/react/internals#12890
019b422Thanks @jerelmiller! - Ensure thevariablesoption foruseMutationprovides proper IntelliSense suggestions.v4.0.2Compare Source
Patch Changes
56fac52Thanks @phryneas! - restoregetMemoryInternalsaccess in dev buildsv4.0.1Compare Source
Patch Changes
#12876
b00f231Thanks @phryneas! - Fix CJS build output forinvariantErrorCodes#12866
0d1614aThanks @jerelmiller! - ExportisNetworkStatusInFlightfrom@apollo/client/utilities. AddisNetworkStatusSettledto@apollo/client/utilitiesand re-export it from@apollo/clientwith a deprecation.v4.0.0Compare Source
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.