You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For ObjectCache, I could improve the granularity of caching if I could re-execute parts (eg, uncacheable parts) of queries without re-running the whole thing. This comes with some possible foot-guns, since fields sometimes depend on "upstream" context for their resolution, but it could also work pretty well in most cases.
I think the best API for me would be something like:
query=GraphQL::Query.new(...)# make a query somehow query_partial=query.partial_for("currentUser","posts")partial_result=query_partial.execute(@current_user.posts)# run the selected portion of the query using the given object as the underlying data
That would also support multiplexing, eg:
query=GraphQLQuery.new(...)# Run these partials concurrently (sharing a dataloader cache, etc) results=query.execute_partials({["currentUser","posts"]=>@current_user.posts,["currentUser","profile","auditLog"]=>AuditLog.events(user: @current_user),# Etc })
Then it's up to the caller how to handle those results.
The text was updated successfully, but these errors were encountered:
For
ObjectCache
, I could improve the granularity of caching if I could re-execute parts (eg, uncacheable parts) of queries without re-running the whole thing. This comes with some possible foot-guns, since fields sometimes depend on "upstream" context for their resolution, but it could also work pretty well in most cases.I think the best API for me would be something like:
That would also support multiplexing, eg:
Then it's up to the caller how to handle those results.
The text was updated successfully, but these errors were encountered: