kinglozzer

General GraphQL question - I’m doing something like the following:

  1. apolloClient.mutate({
  2. mutation: gqlmutation</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #339933;">...</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">
  3. }).then((result) => {
  4. const persistedItems = result.data.setShortlistItemQuantity.Items.edges;
  5. // Then store persistedItems in local Vuex state...
  6. });

unclecheese

I would say so. Shouldn’t the Vue Apollo plugin be managing your query state? What isn’t it doing for you that Vuex is?

kinglozzer

I can probably resolve that though… I’ll keep digging, thanks for the pointer @blueo

👍 (1)
kinglozzer

Right, so using edges { node {} } does “work”, but it’s returning the wrong class… it’s a ManyManyThroughList, and it’s returning the object at the other end of the relation, not the join object

kinglozzer

@blueo I did try edges {}, but not node {}… I’ll give that a shot

blueo

if it is a connection do you need the edges { node { part?