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

Strict type checking, TypedDocumentNode and @apollo/client v3 #1062

Merged
merged 1 commit into from Oct 18, 2020

Conversation

@javiertury
Copy link

@javiertury javiertury commented Sep 26, 2020

The main purpose of this PR is to use @apollo/client v3. The new cache management system is a huge improvement from v2.

I also noticed that strict was not enabled and therefore nullable types were inaccurate. The codebase is very clean, so migrating to strict was easy.

Finally, I saw that @apollo/client added support for TypedDocumentNode, which unifies document, query type and variable type into a single object. Naturally I couldn't resist adding support for this too.

  • esModuleInterop is needed for zen-observable, a dependency of @apollo/client
  • Cannot import directly from @apollo/client because it pulls react. We must import from @apollo/client/<subdir>.
@javiertury javiertury changed the title Strict type checking and @apollo/client v3 [vue-apollo-composable] Strict type checking and @apollo/client v3 Sep 26, 2020
@javiertury javiertury force-pushed the javiertury:v4_strict_and_apollo_3 branch 5 times, most recently from f9c537b to 22ed24a Sep 26, 2020
@javiertury javiertury changed the title [vue-apollo-composable] Strict type checking and @apollo/client v3 Strict type checking, TypedDocumentNode and @apollo/client v3 Sep 26, 2020
@javiertury
Copy link
Author

@javiertury javiertury commented Sep 26, 2020

So after adding support for TypedDocumentNode I think this is PR is done, it brings vue on par with react.

@javiertury javiertury force-pushed the javiertury:v4_strict_and_apollo_3 branch 2 times, most recently from bdb5adc to b006c2c Sep 27, 2020
@tup1tsa
Copy link

@tup1tsa tup1tsa commented Sep 30, 2020

Looking forward for this to be merged. I've encountered a small problem with current type for 'useQuery', where result is TResult and not 'TResult | undefined'. And it is fixed here

@Akryum
Copy link
Member

@Akryum Akryum commented Oct 17, 2020

Hi! Could you please look at those conflicts? Thanks!

@javiertury javiertury force-pushed the javiertury:v4_strict_and_apollo_3 branch 5 times, most recently from a67aef3 to aafdd21 Oct 17, 2020
@javiertury
Copy link
Author

@javiertury javiertury commented Oct 17, 2020

Sure, it should be ready now

@javiertury javiertury force-pushed the javiertury:v4_strict_and_apollo_3 branch from aafdd21 to 044acf1 Oct 17, 2020
@javiertury javiertury force-pushed the javiertury:v4_strict_and_apollo_3 branch from 044acf1 to 0945347 Oct 18, 2020
@Akryum Akryum merged commit fb1ab4d into vuejs:v4 Oct 18, 2020
6 checks passed
6 checks passed
Header rules No header rules processed
Details
Pages changed 80 new files uploaded
Details
Redirect rules No redirect rules processed
Details
Mixed content No mixed content detected
Details
ci/circleci: build Your tests passed on CircleCI!
Details
deploy/netlify Deploy preview ready!
Details
@Akryum
Copy link
Member

@Akryum Akryum commented Oct 18, 2020

Thanks for the huge useful PR! 😻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.