Skip to content

PlaceOrderOutput.errors is nullable since Magento 2.4.9 - #2655

Closed
paales wants to merge 1 commit into
canaryfrom
fix/place-order-errors-nullable-249
Closed

PlaceOrderOutput.errors is nullable since Magento 2.4.9#2655
paales wants to merge 1 commit into
canaryfrom
fix/place-order-errors-nullable-249

Conversation

@paales

@paales paales commented Jul 27, 2026

Copy link
Copy Markdown
Member

Magento 2.4.9 / MageOS 3.2.0 relaxed PlaceOrderOutput.errors from [PlaceOrderError]! to [PlaceOrderError] and the resolver now returns null when the order is placed successfully (see the schema diff: ho-nl/magento2-graphql-versions@2.4.8...2.4.9#diff-efc1675187620595b0844197a25c35eac9b6df752f9182e5cffddee6f27a8489L8943-R9032).

A mesh whose unified schema still declares the field non-null (introspected from an older backend, or any magentoVersion < 249 setup) then fails every successful order at the gateway with:

Cannot return null for non-nullable field PlaceOrderOutput.errors.

while the order is placed in Magento — the customer just sees a generic payment error.

Fix

Add packages/magento-graphql/schema-249/PlaceOrderOutput.graphqls redeclaring errors as nullable. The schema-249 additionalTypeDefs are applied for every project with magentoVersion < 249, so the unified schema always carries the loosest contract across supported Magento versions:

  • 2.4.9 backend + magentoVersion: 248: mesh no longer bombs on errors: null (this was the bug).
  • 2.4.8 backend: still returns a non-null list, which trivially satisfies the nullable field.
  • magentoVersion: 249: typedef not applied; live introspection is already nullable.

Verified that stitching merges a partial type redefinition as expected: errors becomes nullable while order / orderV2 and the rest of the introspected type are preserved. Client code (assertOrderPlaced, PaymentMethodPlaceOrderNoop) already handles errors: null.

🤖 Generated with Claude Code

…2.4.9

Magento 2.4.9 / MageOS 3.2.0 relaxed PlaceOrderOutput.errors from
[PlaceOrderError]! to [PlaceOrderError] and returns null on a successfully
placed order. A mesh built for magentoVersion < 249 still declared the field
non-null, so every successful placeOrder against a 2.4.9 backend failed with
'Cannot return null for non-nullable field PlaceOrderOutput.errors.'

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Jul 27, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 64fd234

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 86 packages
Name Type
@graphcommerce/magento-graphql Patch
@graphcommerce/magento-graphcms Patch
@graphcommerce/magento-open-source Patch
@graphcommerce/magento-storyblok Patch
@graphcommerce/docs Patch
@graphcommerce/browserslist-config-pwa Patch
@graphcommerce/changeset-changelog Patch
@graphcommerce/eslint-config-pwa Patch
@graphcommerce/graphql-codegen-markdown-docs Patch
@graphcommerce/graphql-codegen-near-operation-file Patch
@graphcommerce/graphql-codegen-relay-optimizer-plugin Patch
@graphcommerce/misc Patch
@graphcommerce/next-config Patch
@graphcommerce/prettier-config-pwa Patch
@graphcommerce/typescript-config-pwa Patch
@graphcommerce/address-fields-nl Patch
@graphcommerce/algolia-categories Patch
@graphcommerce/algolia-insights Patch
@graphcommerce/algolia-personalization Patch
@graphcommerce/algolia-products Patch
@graphcommerce/algolia-recommend Patch
@graphcommerce/algolia-search Patch
@graphcommerce/cli Patch
@graphcommerce/demo-magento-graphcommerce Patch
@graphcommerce/ecommerce-ui Patch
@graphcommerce/framer-next-pages Patch
@graphcommerce/framer-scroller Patch
@graphcommerce/framer-utils Patch
@graphcommerce/google-datalayer Patch
@graphcommerce/google-playstore Patch
@graphcommerce/googleanalytics Patch
@graphcommerce/googlerecaptcha Patch
@graphcommerce/googletagmanager Patch
@graphcommerce/graphcms-ui Patch
@graphcommerce/graphql-mesh Patch
@graphcommerce/graphql Patch
@graphcommerce/hygraph-cli Patch
@graphcommerce/hygraph-dynamic-rows-ui Patch
@graphcommerce/hygraph-dynamic-rows Patch
@graphcommerce/hygraph-ui Patch
@graphcommerce/image Patch
@graphcommerce/lingui-next Patch
@graphcommerce/magento-cart-checkout Patch
@graphcommerce/magento-cart-coupon Patch
@graphcommerce/magento-cart-email Patch
@graphcommerce/magento-cart-items Patch
@graphcommerce/magento-cart-payment-method Patch
@graphcommerce/magento-cart-pickup Patch
@graphcommerce/magento-cart-shipping-address Patch
@graphcommerce/magento-cart-shipping-method Patch
@graphcommerce/magento-cart Patch
@graphcommerce/magento-category Patch
@graphcommerce/magento-cms Patch
@graphcommerce/magento-compare Patch
@graphcommerce/magento-customer Patch
@graphcommerce/magento-graphql-rest Patch
@graphcommerce/magento-newsletter Patch
@graphcommerce/magento-payment-adyen Patch
@graphcommerce/magento-payment-afterpay Patch
@graphcommerce/magento-payment-braintree Patch
@graphcommerce/magento-payment-included Patch
@graphcommerce/magento-payment-klarna Patch
@graphcommerce/magento-payment-multisafepay Patch
@graphcommerce/magento-payment-paypal Patch
@graphcommerce/magento-payment-tokens Patch
@graphcommerce/magento-product-bundle Patch
@graphcommerce/magento-product-configurable Patch
@graphcommerce/magento-product-downloadable Patch
@graphcommerce/magento-product-grouped Patch
@graphcommerce/magento-product-simple Patch
@graphcommerce/magento-product-virtual Patch
@graphcommerce/magento-product Patch
@graphcommerce/magento-recently-viewed-products Patch
@graphcommerce/magento-review Patch
@graphcommerce/magento-search-overlay Patch
@graphcommerce/magento-search Patch
@graphcommerce/magento-store Patch
@graphcommerce/magento-wishlist Patch
@graphcommerce/mollie-magento-payment Patch
@graphcommerce/next-ui Patch
@graphcommerce/react-hook-form Patch
@graphcommerce/service-worker Patch
@graphcommerce/storyblok-ui Patch
@graphcommerce/framer-next-pages-example Patch
@graphcommerce/framer-scroller-example Patch
@graphcommerce/image-example Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Jul 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
graphcommerce-246 Ready Ready Preview Jul 27, 2026 6:39pm
graphcommerce-247 Ready Ready Preview Jul 27, 2026 6:39pm
graphcommerce-hygraph-dynamic-rows-ui Ready Ready Preview Jul 27, 2026 6:39pm
graphcommerce-open-source Ready Ready Preview Jul 27, 2026 6:39pm
graphcommerce-storyblok Building Building Preview Jul 27, 2026 6:39pm

Request Review

@paales

paales commented Jul 31, 2026

Copy link
Copy Markdown
Member Author

SLOP

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.

1 participant