Comments (3)
Hey @jeromedalbert, could you please try to use then? Something like resolved.then { |value| ... }
from graphql-ruby-fragment_cache.
No luck with that, it returns a GraphQL::Execution::Lazy
too
from graphql-ruby-fragment_cache.
I think the root cause of the problem is that my resolve
helper code does not define any query in GraphQL::Query.new
. That is why I am getting errors about a nil operation_type
, since no operation (query or mutation or subscription) is defined.
Just for the heck of it I passed a placeholder query GraphQL::Query.new(MyAppSchema, 'query { posts { title } }', context: context)
and did resolved.value
, but that gives me the following:
NoMethodError: undefined method `map' for nil:NilClass
from /Users/jerome/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/graphql-fragment_cache-1.13.1/lib/graphql/fragment_cache/cache_key_builder.rb:177:in `bl
ock in path_cache_key'
because the CacheKeyBuilder
path
is nil. It makes sense since I am trying to shoehorn a query that is not being executed the normal way.
graphql-ruby-fragment_cache
needs a path to compute its cache key, but my resolve
helper code never provides one. As is, the helper code is incompatible with the gem. It might be possible to make it work by making the helper "backfill" a query from the field name, and there would still be this nil path
issue to figure out. But I think it is overkill and the simplest solution is probably to disable cache processing with #90.
from graphql-ruby-fragment_cache.
Related Issues (20)
- graphql-ruby 2.0.18 causing tracer breaking changes HOT 2
- Schema.instrument is deprecated
- Deprecation warning for tracer HOT 1
- Rails 7.1 deprecation notice for `cache_format_version` in Rails `test` environment HOT 4
- Way to conditionally use fragment cache? HOT 4
- Federated queries including cached fields raises an error HOT 2
- Recyclable Cache Keys? HOT 3
- [Unable to use] graphql-ruby-fragment_cache + action_policy-graphql HOT 5
- Fragment cache somtimes returns null despite cached data loading initially HOT 20
- Package not working with graphql-ruby > 1.12.10 HOT 2
- Per request cache? HOT 1
- Namespace issue HOT 2
- How do I expire a cached collection when a sub model changes? HOT 3
- "Failed to implement Post.id" when returning cached RawValue in resolvers HOT 1
- Make the cache key human-readable HOT 3
- [Question] Programmatically Clear Entire Cache HOT 7
- Upgrade to 1.18.0 version error HOT 2
- Cache connection type using multi HOT 3
- Clarification on cache_key options HOT 6
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 graphql-ruby-fragment_cache.