graphql-ruby-fragment_cache icon indicating copy to clipboard operation
graphql-ruby-fragment_cache copied to clipboard

Add #read_multi for fragments

Open daukadolt opened this issue 4 years ago • 5 comments

An MVP version (I'd at least need to add specs) of #read_multi implementation idea

#44

daukadolt avatar Jun 19 '21 21:06 daukadolt

Tested locally and and it seems to work! Let's resolve the issue with specs and it will be good to go

DmitryTsepelev avatar Jul 07 '21 09:07 DmitryTsepelev

@daukadolt Hi, did you have a chance to take a look at it? Anything I can help you with?

DmitryTsepelev avatar Aug 16 '21 12:08 DmitryTsepelev

Yo guys. Maybe I can help to finish that?

frostmark avatar Jul 30 '22 17:07 frostmark

Ah, I got it, this branch just needs to update from the master and all tests will be passed. @DmitryTsepelev Take a look please

frostmark avatar Jul 31 '22 05:07 frostmark

tried to rebase, but it still gives me

  1) #cache_fragment context caching when keep_in_context is true calls #read once
     Failure/Error: expect(GraphQL::FragmentCache.cache_store).to have_received(:read).exactly(4)

       (#<GraphQL::FragmentCache::MemoryStore:0x000000010c413518 @default_expires_in=nil, @storage={"fdcef8645ebc3c51d2b94f656ac93230091fa7ce"=>#<struct GraphQL::FragmentCache::MemoryStore::Entry value={"id"=>"1", "title"=>"object test"}, expires_at=nil>}>).read(*(any args))
           expected: 4 times with any arguments
           received: 6 times with any arguments
     # ./spec/graphql/fragment_cache/object_helpers_spec.rb:726:in `block (4 levels) in <compiled>'

DmitryTsepelev avatar Jul 31 '22 09:07 DmitryTsepelev