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

#275: Separate apolloClient into module #276

Merged
merged 4 commits into from
Nov 18, 2022
Merged

Conversation

aswallace
Copy link
Collaborator

@aswallace aswallace commented Nov 18, 2022

Separate apolloClient into its own module. Current version works with Vuex actions, but still requires cache and link (error below)
Note that omitting link and cache from new ApolloClient results in the following error:

In order to initialize Apollo Client, you must specify 'link' and 'cache' properties in the options object.
These options are part of the upgrade requirements when migrating from Apollo Client 1.x to Apollo Client 2.x.
For more information, please visit: https://www.apollographql.com/docs/tutorial/client.html#apollo-client-setup

close #275

@aswallace aswallace requested a review from tholulomo as a code owner November 18, 2022 20:06
@aswallace aswallace self-assigned this Nov 18, 2022
@aswallace aswallace linked an issue Nov 18, 2022 that may be closed by this pull request
@aswallace aswallace added this to the 11/17/22 - 12/1/22 milestone Nov 18, 2022
@aswallace
Copy link
Collaborator Author

aswallace commented Nov 18, 2022

I tried this out on the spreadsheet upload branch, and it doesn't work with Vuex since the default export is a function that requires a parameter (so I can't do things like call apollo.mutate). Thoughts on how to fix it?

Edit: Resolved with recent changes

Copy link
Contributor

@tholulomo tholulomo left a comment

Choose a reason for hiding this comment

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

LGTM

@aswallace aswallace merged commit 7570d3c into develop Nov 18, 2022
@aswallace aswallace deleted the #275_apollo_client_module branch November 18, 2022 23:39
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.

Apollo Client module
2 participants