Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON stringify string to match expectation of "extraData" on cartItem #453

Merged
merged 3 commits into from
Mar 17, 2021
Merged

JSON stringify string to match expectation of "extraData" on cartItem #453

merged 3 commits into from
Mar 17, 2021

Conversation

davevanhoorn
Copy link
Contributor

@davevanhoorn davevanhoorn commented Mar 9, 2021

  • [✅ ] Make sure you are making a pull request against the develop branch (left side). Also you should start your branch off our develop.
  • [✅ ] Make sure you are requesting to pull request from a topic/feature/bugfix/devops branch (right side). Don't pull request from your master!
  • [❌ ] Have you ensured/updated that CLI tests to extend coverage to any new logic. Learn how to modify the tests here.

What does this implement/fix? Explain your changes.

"extraData" expects a string but receives an array or object. This bugfix JSON encodes an array so a string is returned.

Does this close any currently open issues?

This might also fix issue 437. I had the same error locally and it's solved.

Any relevant logs, error output, GraphiQL screenshots, etc?

Screenshot of GraphiQL response in wp-admin before fix
Screenshot of GraphiQL response in wp-admin after fix

Any other comments?

No. Thanks for the great work :)

Where has this been tested?

Locally.

  • WooGraphQL Version: 0.6.2
  • WPGraphQL Version: 1.2.5
  • WordPress Version: 5.6.2
  • WooCommerce Version: 5.0.0

@codeclimate
Copy link

codeclimate bot commented Mar 9, 2021

Code Climate has analyzed commit 841c820 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 86.9% (0.0% change).

View more on Code Climate.

Copy link
Member

@kidunot89 kidunot89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davevanhoorn Sorry for the delay review, and great work. Approved 🤔

@kidunot89 kidunot89 merged commit 882c457 into wp-graphql:develop Mar 17, 2021
@kidunot89 kidunot89 added the bugfix Implements bugfix label Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Implements bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants