Skip to content

Conversation

@aldeed
Copy link
Contributor

@aldeed aldeed commented Aug 13, 2018

Resolves #4512
Impact: breaking
Type: feature

Changes

  • updateFulfillmentOptionsForGroup mutation now works
  • registerFunction is now available on the context passed to a plugin startup function. registerFunction("getShippingPrices", getShippingPrices); is now the way to register a function for getting shipping prices (quotes).

Breaking changes

  • When getting shipping quotes, "onGetShippingRates" hooks are no longer used. Instead plugins should call registerFunction("getShippingPrices", getShippingPrices); following the pattern of the included shipping rates plugin. The provided function must not depend on Meteor or cause any Meteor packages to be imported. The arguments that are provided to this function are slightly different, too. They are now (context, cart, previousQueryResults). Use context.collections to get collections for any database calls. (This pattern is subject to change.)
  • The "shipping/updateShipmentQuotes" Meteor method now passes through to the updateFulfillmentOptionsForGroup mutation, and it takes two additional arguments (fulfillmentGroupId, cartToken). It is now called in fewer places and does not do as many adjustments of the fulfillment group object, instead assuming that they will be in the necessary state (exist, have a shipping address, have items, etc.) prior to the method being called.

Testing

  • Verify the mutation updates the shipping quotes on the specified cart fulfillment group.
  • Verify that adding items to cart and checking out still works in Reaction Meteor app.

@aldeed aldeed self-assigned this Aug 13, 2018
@aldeed aldeed added this to the Kit Carson milestone Aug 13, 2018
@aldeed aldeed changed the title [WIP] GraphQL: update fulfillment options for group GraphQL: update fulfillment options for group Aug 13, 2018
@aldeed aldeed requested a review from nnnnat August 13, 2018 18:43
@nnnnat nnnnat changed the base branch from feat-4497-aldeed-graphql-setShippingAddressOnCart to release-1.15.0 August 13, 2018 21:31
Copy link
Contributor

@nnnnat nnnnat left a comment

Choose a reason for hiding this comment

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

👍

@nnnnat nnnnat merged commit 252fc53 into release-1.15.0 Aug 14, 2018
@spencern spencern mentioned this pull request Aug 14, 2018
@aldeed aldeed deleted the feat-4512-aldeed-graphql-updateFulfillmentOptionsForGroup branch December 17, 2018 00:22
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.

3 participants