Comments (1)
Hi!
In the incubating version we've started transitioning to ApolloResolver
to replace CacheResolver
. It is the same thing but with a slightly different API that will help with evolving the library in a non-breaking way. The version of ApolloStore()
that accepts the FieldNameGenerator
etc. is expecting an ApolloResolver
.
However there is no ApolloResolver
version of CacheKeyResolver
- we should definitely add it. In the meantime you can transform your existing resolver into an ApolloResolver
with something like:
class ApolloCacheKeyAdapter(private val cacheKeyResolver: CacheKeyResolver) : ApolloResolver {
override fun resolveField(context: ResolverContext): Any? {
return cacheKeyResolver.resolveField(variables = context.variables, parent = context.parent, parentId = context.parentKey, field = context.field)
}
}
and pass ApolloCacheKeyAdapter(yourExistingCacheKeyResolver)
to ApolloStore()
.
from apollo-kotlin.
Related Issues (20)
- Sub-protocol not included when opening websocket [4.0.0-beta6] HOT 3
- Possible performance regression in v4.0.0-beta.7 HOT 9
- Support the notion of partially sharing types between 2 schemas HOT 2
- [IJ Plugin] Cache GraphQL project config HOT 2
- Status Code 500 Not parsing error body HOT 4
- Embed GraphQL metadata in the jar/klib
- Investigate serverCloseNicely flake
- Move apollo-execution out of the main repo
- writeOperation/writeFragment no longer publish updates by default HOT 7
- RetryOnNetworkErrorInterceptor should be configurable HOT 3
- doNotStoreOnDisk() HOT 3
- How to prevent arrays inside cached object being overwritten? HOT 3
- [v3] Calling toJson on an Operation.Data object throws ClassNotFoundException HOT 3
- Apollo v2 to v3 refresh token mechanism HOT 6
- `@link` should report an error on unknown directives
- Do not report missing "introspection" block in non-Schema modules, while still report it on the Schema module as expected. HOT 3
- Apollo 4 AST - add a flag to relax parsing and allow empty `extend type` HOT 4
- Allow changing the WebSocket headers from an ApolloInterceptor HOT 7
- how pass query variables to client in every request ? HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apollo-kotlin.