apollo-client: Missing AC3 documentation improvements ☔
This issue tracks the docs items that weren’t completed in https://github.com/apollographql/apollo-client/pull/6429.
TODO:
- Refactor all pagination documentation
- ~Deprecate
fetchMode
’supdateQuery
, replacing with field policies (https://github.com/apollographql/apollo-client/pull/6464)~ - ~Explain what
keyArgs: false
does~- See https://deploy-preview-7175--apollo-client-docs.netlify.app/docs/react/pagination/key-args/ /6852#issuecomment-674984235)
-
@apollo/client/core
,@apollo/client/utilities
,@apollo/client/testing
,@apollo/client/cache
, etc. entry points - ~Properly explain how
cache.writeQuery/Fragment
broadcasting can be silenced using thebroadcast
option (and what the advantages are to doing so - reference: https://github.com/apollographql/apollo-client/pull/6288) 👉 https://github.com/apollographql/apollo-client/pull/9978~ - ~Explain how to use
cache.performTransaction()
to batch writes without broadcasting until they’ve all finished.cache.batch
(introduced in https://github.com/apollographql/apollo-client/pull/7819) provides a better API and essentially wrapsperformTransaction
, so it’s the one we should recommend people use. 👉 https://github.com/apollographql/apollo-client/pull/9987~ - ~Document
merge: false
(e.g. https://github.com/apollographql/apollo-client/pull/6372#issuecomment-670593650) 👉 https://github.com/apollographql/apollo-client/pull/9969~ - ~Document
useReactiveVar
(https://github.com/apollographql/apollo-client/pull/6867) 👉 apollographql/apollo-client#9906~ - ~Document type policy inheritance, using
possibleTypes
(https://github.com/apollographql/apollo-client/pull/7065) 👉 apollographql/apollo-client#9905~ - ~Document custom merge function support in type policies (https://github.com/apollographql/apollo-client/pull/7070)~
- ~Explain how to properly test local state using
MockedProvider
, by passing a configuredcache
intoMockedProvider
itself (https://github.com/apollographql/apollo-client/issues/4532)PR
https://github.com/apollographql/apollo-client/pull/9867~ - ~Remove deprecated language from dataIdFromObject apollographql/apollo-client#9817~
- updateQuery documentation error apollographql/apollo-client#9832
- Missing docs about aborted requests for V3 apollographql/apollo-client#9882
- Potential Missing docs for
MyQueryInterface
apollographql/apollo-client#9946 - Allow registering named fragments with InMemoryCache to support using …FragmentName in queries without redeclaring FragmentName in every query apollographql/apollo-client#9764
- Avoid letting defaultDataIdFromObject normalize objects with nullish ids apollographql/apollo-client#9862
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 19
- Comments: 15 (8 by maintainers)
Would be good to get some more clarification around testing especially around client directives and reactive variables.
I’m looking for documentation for local-only mutations. I see there’s still a checkbox missing with the mutation example, but if someone could explain to me what I’m doing wrong, that would be great.
Our application makes use of the old local resolvers. Now I want to ‘update’ them to typePolicies. My old resolver looked like:
Now I changed it to this typePolicy:
the mutation gets called like this:
However the console.log never gets called. Is there something I’m missing?
edit: found my answer here: https://spectrum.chat/apollo/apollo-client/ac3-client-mutation~a0f064bf-731b-4129-8016-601217d45971
@dmitry I didn’t migrate from local mutation resolvers to reactive variables, but I threw away the local mutations and just did direct cache updates with read/writeQuery.
I think this issue about undefined old data when loading new data could use some love in the documentation / migration guides too.
@abdonrd We’re working on overhauling the main pagination section of the docs, but in the meantime you can find some details here: https://www.apollographql.com/docs/react/caching/cache-field-behavior/#handling-pagination