Skip to content

Further GraphQL improvements, clean up of JSON API

Compare
Choose a tag to compare
@carstendietrich carstendietrich released this 11 Feb 14:56
· 221 commits to master since this release
d3a1dff

cart

  • Added desired time to DeliveryForm

  • InMemoryCartStorage: initialize lock and storage already in Inject() to avoid potential race conditions

  • API

    • Add endpoints for deleting / updating a item in the cart (DELETE/PUT: /api/v1/cart/delivery/{deliveryCode}/item)
    • Breaking: Affects v1 prefixed routes, switched to a more RESTful naming and use of the correct HTTP verbs to mark idempotent operations
      • old HTTP verb old route new HTTP verb new route
        POST /api/v1/cart/delivery/{deliveryCode}/additem POST /api/v1/cart/delivery/{deliveryCode}/item
        POST/PUT /api/v1/cart/applyvoucher POST /api/v1/cart/voucher
        POST/DELETE /api/v1/cart/removevoucher DELETE /api/v1/cart/voucher
        POST/PUT /api/v1/cart/applygiftcard POST /api/v1/cart/gift-card
        POST /api/v1/cart/applycombinedvouchergift POST /api/v1/cart/voucher-gift-card
        POST /api/v1/cart/removegiftcard DELETE /api/v1/cart/gift-card
        POST /api/v1/cart/billing PUT /api/v1/cart/billing
        POST /api/v1/cart/delivery/{deliveryCode}/deliveryinfo PUT /api/v1/cart/delivery/{deliveryCode}
        PUT /api/v1/cart/updatepaymentselection PUT /api/v1/cart/payment-selection
  • GraphQL

    • Update schema and resolver regarding desired time

category

  • Added cue config to module
  • Update fake service documentation
  • FakeService
    • The category fake service was added which can return a project specific category tree and categories
    • Added configuration options are fakeService.enabled and fakeService.testDataFolder to enable the fake category service and to use json files as fake categories and tree. You can find examples in the documentation of the module

checkout

  • Checkout Controller, update handling of aborted/canceled payments:
    • Cancel the order / restore the cart before generating the new idempotency key of the payment selection
  • Resolve goroutine leak in redis locker
  • Breaking Change StartPlaceOrder behaviour to always start a new one.
  • Breaking Change ClearPlaceOrderProcess behaviour to be always possible (no matter on which state)
  • API
    • Breaking: Affects v1 prefixed routes, switched to a more RESTful naming and use of the correct HTTP verbs to mark idempotent operations
      • old HTTP verb old route new HTTP verb new route
        POST /api/v1/checkout/placeorder/refreshblocking POST /api/v1/checkout/placeorder/refresh-blocking

customer

  • GraphQL
    • Extend Commerce_Customer_Address with some useful fields
    • Extend Commerce_Customer_Result with a field for querying a specific address
    • Breaking:
      • Commerce_Customer_Address: rename field StreetNr to StreetNumber, lastname to lastName and firstname to firstName
      • Commerce_Customer_Result: defaultShippingAddress and defaultBillingAddress now can return null if there is no default address
      • Commerce_Customer_PersonData: field birthday is now nullable and of type Date.

payment

  • Introduced wallet payment method

product

  • Add support for product badges
  • GraphQL
    • Breaking New schema for products:
      • Commerce_Product has been restructured and now has three subtypes: Commerce_Product_SimpleProduct, Commerce_Product_ConfigurableProduct, Commerce_Product_ActiveVariantProduct
      • Product variant data, that has previously been buried in Commerce_ConfigurableProduct.variants, has been mapped to the toplevel of each product and can be accessed directly.
      • Both ActiveVariantProduct and ConfigurableProduct provide a new property named variationSelections which exposes a list of possible attribute combinations for the configurable.
  • FakeService
    • The product fake search service is now able to return products with an active variant via fake_configurable_with_active_variant. Variation attributes have been changed to only include color and size.
    • Added configuration option jsonTestDataFolder to use json files as fake products. You can find an example product under: test/integrationtest/projecttest/tests/graphql/testdata/products/json_simple.json
    • Added fakservice documentation to the product module.
    • The product fake search service is now able to return a specific product if the given query matches the marketplace code / name of the json file of the product
    • The product fake search service returns no products if it is queried with no-results
  • Expose VariantVariationAttributesSorting on domain.ConfigurableProductWithActiveVariant
  • Breaking: Update stock handling: Remove magic alwaysInStock product attribute. Just Rely BasicProductData.StockLevel field instead.

sourcing

  • Breaking
    • Optional pointer DeliveryInfo added as parameter to StockProvider.GetStock

docs

  • Embed swagger.json via go-bindata, so it can be used from the outside