Describe the bug
A clear and concise description of what the bug is.
Sorry if this one is a big vague but I'm not proficient in WordPress or PHP but I was able to create somewhat of a reproduction.
The bug (maybe?) is that in certain environments, cart mutations will timeout and result in some 5xx error. Locally (in a docker container) it seems to be fine.
Maybe it's an HTTPS issue? I honestly don't know much here 😅
To Reproduce
Steps to reproduce the behavior:
I created an EasyWP test site to try this out in. This instance contains a brand new installation of WPGraphQL, WooGraphQL, and WooCommerce. Feel free to use it to test this out.
addToCartMutationmutation {
addToCart(input: {clientMutationId: "some-id", productId: 8}) {
cart {
contents {
nodes {
key
product {
name
}
}
}
}
}
}
woocommerce-session header from the pervious request.the query:
{
cart {
subtotal
contents {
nodes {
product {
name
}
}
}
}
}
the full curl:
curl --request POST \
--url https://test-13406f.ingress-bonde.easywp.com/graphql \
--header 'content-type: application/json' \
--header 'woocommerce-session: Session eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvdGVzdC0xMzQwNmYuaW5ncmVzcy1ib25kZS5lYXN5d3AuY29tIiwiaWF0IjoxNTg1Mjc3MzI0LCJuYmYiOjE1ODUyNzczMjQsImV4cCI6MTU4NTQ1MDEyNCwiZGF0YSI6eyJjdXN0b21lcl9pZCI6IjA4NjUxZjQ0NzU4MGY0NjU0MTY5NDdhN2U5MTI2Zjk4In19.lEL0WsgU5Ah9BSkj1Uonv9DDKWvo_FCnWFcX2HMn_9w' \
--data '{"query":"{\n cart {\n subtotal\n contents {\n nodes {\n product {\n name\n }\n }\n }\n }\n}"}'
Expected behavior
A clear and concise description of what you expected to happen.
It should return the correct cart from the session
Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.
@kidunot89 If it's helpful, I can give you access to this WordPress instance. DM me on slack @Rico Kahler
Update: I updated the test instance to WPGraphQL 0.8.0 and WooGraphQL 0.5.0 and this issue still occurs. Also this happens in both managed WP providers: WPEngine and EasyWP
@ricokahler I haven't had time to look into this yet. Do you possibly have access to the Apache or Nginx error logs for either of those servers?
Do you possibly have access to the Apache or Nginx error logs for either of those servers?
Not that I'm aware of. EasyWP gives you SFTP access and Database access but nothing for Apache/Nginx logs.
I could probably get some logs the from WPEngine instance however that's my workplace's environment so it's a bit harder to give you those.
An interesting thing I found out about it is that if I retry a request with a session a few hours later, it works and doesn't timeout. But if I re-request that same request a few seconds later, it times out. I don't know if that makes things easier or harder to debug 🤷♀️
Thanks for looking into this. Feel free to DM me on slack.
I'm getting this too and not sure how to fix it. It's blocking us in production currently. Is there any quick fix or workaround I can try? :sob:
Thank you!
Any update on this @mujz
@mujz I'll try and look more into this soon. Sounds like something maybe going astray with the session token.
@mujz Did you ever get a solution on this? I'm currently having the same isuue.
@ricokahler @pandabrand @mujz This is likely to be resolved with this PR #398
Most helpful comment
@ricokahler @pandabrand @mujz This is likely to be resolved with this PR #398