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

collectionStats query fully implemented #849

Merged
merged 7 commits into from
May 17, 2024

Conversation

kidunot89
Copy link
Member

@kidunot89 kidunot89 commented May 7, 2024

Your checklist for this pull request

Thanks for sending a pull request! Please make sure you click the link above to view the contribution guidelines, then fill out the blanks below.

🚨Please review the guidelines for contributing to this repository.

  • 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.

  • Fixes regressions created by WPGraphQL v1.24.x
  • Fixes collectionStats query parameters
  • Adds attributes field to the *ToProductUnionConnectionWhereArgs input types
  • Deprecates attribute and attributeTerm on the *ToProductUnionConnectionWhereArgs input types
  • Requires collectionStats query and attributes field functionality introduced in WooCommerce v3.9.0

Does this close any currently open issues?

Resolves #845

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

(If it’s long, please paste to https://ghostbin.com/ and insert the link here.)

Any other comments?

Where has this been tested?

  • WooGraphQL Version:
  • WPGraphQL Version:
  • WordPress Version:
  • WooCommerce Version:

@kidunot89 kidunot89 added breaking change Solution will break some older solutions bugfix Implements bugfix labels May 7, 2024
@kidunot89 kidunot89 self-assigned this May 7, 2024
@kidunot89 kidunot89 requested a review from justlevine May 7, 2024 15:28
'attribute' => [
'type' => 'String',
'description' => __( 'Limit result set to products with a specific attribute. Use the taxonomy name/attribute slug.', 'wp-graphql-woocommerce' ),
'type' => 'ProductAttributeEnum',
Copy link
Contributor

Choose a reason for hiding this comment

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

Changing the type makes this breaking for schemas already using it. If it's deprecated anyway is there a need to change the type as well?

Copy link
Member Author

@kidunot89 kidunot89 May 7, 2024

Choose a reason for hiding this comment

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

No, there isn't. Thanks for reminding me about the potential headache this will cause 🤣. I'll change it back before merging

/**
* The instance of the class that helps filtering with the product attributes lookup table.
*
* @var Filterer
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* @var Filterer
* @var \Automattic\WooCommerce\Internal\ProductAttributesLookup\Filterer

Add |\stdClass ,if this prop is overloadable.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's not overloadable as fair as I know.

Copy link
Contributor

@justlevine justlevine left a comment

Choose a reason for hiding this comment

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

Commented on the few things in the diff that jumped out at me, nothing pressing.

@kidunot89 kidunot89 changed the title fix: WPGraphql v1.24.x support added and collectionStats query fully implemented collectionStats query fully implemented May 7, 2024
@kidunot89 kidunot89 changed the title collectionStats query fully implemented collectionStats query fully implemented May 7, 2024
@kidunot89 kidunot89 force-pushed the fix/wp-graphql-1.24.x-support branch from c3e072e to e65ef93 Compare May 13, 2024 14:54
@kidunot89 kidunot89 merged commit f1d96be into wp-graphql:develop May 17, 2024
14 checks passed
@kidunot89 kidunot89 deleted the fix/wp-graphql-1.24.x-support branch May 17, 2024 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Solution will break some older solutions bugfix Implements bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pagination doesn't work when order by TOTAL_SALES
2 participants