Wp-graphql-woocommerce: Cart Query

Created on 29 Jan 2020  路  4Comments  路  Source: wp-graphql/wp-graphql-woocommerce

Hi thanks for your work.

I use your plugin to develop a react-native apps.

But I have a problem when I add a item to the cart and try to fetch the cart after. The cart is empty.

I have read the code a bit and set the woocommerce-session header with the one the addToCart mutation return, but I still have an empty cart.

Can you give me a hint I will explore it and post the result here for others, who may encounter this problem later.

question

Most helpful comment

Hi @kidunot89 you are a rock thanks again. it's perfect.
When I will finish with the checkout process I will show you the result of this react native apps.

All 4 comments

@huniqcast Make sure you implemented retrieved and stash the woocommerce session took to send with your GraphQL request. Here is an example with React/Apollo

Hi @kidunot89 you are a rock thanks again. it's perfect.
When I will finish with the checkout process I will show you the result of this react native apps.

hi @huniqcast , would you mind share apollo config?

@huniqcast Make sure you implemented retrieved and stash the woocommerce session took to send with your GraphQL request. Here is an example with React/Apollo

hi @huniqcast , i am trying to do the same and getting same results as you described. can you please share your example that how you resolve this. thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aresrioja10 picture aresrioja10  路  6Comments

mehidi258 picture mehidi258  路  3Comments

pmventura picture pmventura  路  3Comments

hwsiew picture hwsiew  路  6Comments

mohaimenmahi picture mohaimenmahi  路  5Comments