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

[3.0.0] Various product GQL fixes #6053

Merged
merged 7 commits into from
Jan 27, 2020
Merged

Conversation

aldeed
Copy link
Contributor

@aldeed aldeed commented Jan 24, 2020

Resolves #6034
Resolves #6044
Impact: minor
Type: bugfix

Fixes

  • Refactored createProduct, createProductVariant, updateProduct, and updateProductVariant mutations, fixing and optimizing various things
  • The arguments to "afterVariantUpdate" event were not being consistently emitted and used. Now they are. Also, it's now called once with fields rather than many times with field.
  • Removed unneeded stuff (label, defaultValue, etc.) from product and variant SimpleSchemas
  • Fix GQL/input schemas for updateProduct and updateProductVariant so that you can't update things like _id and ancestors that would cause errors or be insecure.
  • Fix handling of email addresses when inviting emails that don't already have an account. The case in which an admin enters the invite email no longer has to match the case in which the invitee enters it when registering. [3.0.0] AccountInvites are case-sensitive #6034
  • Update products GQL query to have a default sort of createdAt descending. Ensure that we're always setting createdAt and updatedAt properly everywhere. Add default sort for products API as createdAt ascending #6044

Breaking changes

The refactor of the "afterVariantUpdate" emits is technically breaking, but it was previously broken, so now it's double broken, which equals fixed.

Testing

Also remove input fields that should not be updated

Signed-off-by: Eric Dobbertin <[email protected]>
@aldeed aldeed requested a review from mikemurray January 24, 2020 23:20
Copy link
Member

@mikemurray mikemurray left a comment

Choose a reason for hiding this comment

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

👍

@mikemurray mikemurray merged commit ba3cb38 into release-3.0.0 Jan 27, 2020
@mikemurray mikemurray deleted the fix-aldeed-product-fixes branch January 27, 2020 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants