Skip to content

Trouble with QL Session Handler #208

Closed
@ardiewen

Description

@ardiewen

Hi there,

I'm having some trouble implementing the QL Session Handler example as described in #88 in order to support persistent cart sessions for guest checkouts.

I have created a minimal sandbox environment to illustrate the problem here: https://codesandbox.io/s/crazy-hugle-sm1eb

Expected Behaviour:

  1. User initiates a cart mutation via the Add To Cart button, and receives a 200 response.
  2. If a session doesn't exist, a new session is initialized and stored in local storage (per example).
  3. Once the session is created, subsequent clicks of the button will continue incrementing the item in the cart.

Actual Behaviour:

  1. User initiates a cart mutation and receives a successful 200 response.
  2. Doesn't appear that anything is added to localStorage.
  3. Additional clicks of the button still continue to receive 200 response, but does not increment the quantity in cart.

Additional Notes:

Using the WP GraphiQL plugin to do this on my WP backend appears to work fine.
Screen Shot 2020-01-05 at 10 48 23 PM

Any insights would be appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions