Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upStrict type checking, TypedDocumentNode and @apollo/client v3 #1062
Conversation
f9c537b
to
22ed24a
So after adding support for |
bdb5adc
to
b006c2c
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 |
Hi! Could you please look at those conflicts? Thanks! |
a67aef3
to
aafdd21
Sure, it should be ready now |
aafdd21
to
044acf1
044acf1
to
0945347
Thanks for the huge useful PR! |
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 tostrict
was easy.Finally, I saw that
@apollo/client
added support forTypedDocumentNode
, 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 forzen-observable
, a dependency of@apollo/client
@apollo/client
because it pullsreact
. We must import from@apollo/client/<subdir>
.