--- title: CartWarning - Storefront API description: A warning that occurred during a cart mutation. api_version: 2024-10 api_name: storefront type: object api_type: graphql source_url: html: 'https://shopify.dev/docs/api/storefront/2024-10/objects/CartWarning' md: 'https://shopify.dev/docs/api/storefront/2024-10/objects/CartWarning.txt' --- # Cart​Warning object A warning that occurred during a cart mutation. ## Fields * code [Cart​Warning​Code!](https://shopify.dev/docs/api/storefront/2024-10/enums/CartWarningCode) non-null The code of the warning. * message [String!](https://shopify.dev/docs/api/storefront/2024-10/scalars/String) non-null The message text of the warning. * target [ID!](https://shopify.dev/docs/api/storefront/2024-10/scalars/ID) non-null The target of the warning. *** ## Map No referencing types *** ## Mutations * [cart​Attributes​Update](https://shopify.dev/docs/api/storefront/2024-10/mutations/cartAttributesUpdate) mutation Updates the attributes on a cart. * [cart​Buyer​Identity​Update](https://shopify.dev/docs/api/storefront/2024-10/mutations/cartBuyerIdentityUpdate) mutation Updates customer information associated with a cart. Buyer identity is used to determine [international pricing](https://shopify.dev/custom-storefronts/internationalization/international-pricing) and should match the customer's shipping address. * [cart​Create](https://shopify.dev/docs/api/storefront/2024-10/mutations/cartCreate) mutation Creates a new cart. * [cart​Discount​Codes​Update](https://shopify.dev/docs/api/storefront/2024-10/mutations/cartDiscountCodesUpdate) mutation Updates the discount codes applied to the cart. * [cart​Gift​Card​Codes​Update](https://shopify.dev/docs/api/storefront/2024-10/mutations/cartGiftCardCodesUpdate) mutation Updates the gift card codes applied to the cart. * [cart​Lines​Add](https://shopify.dev/docs/api/storefront/2024-10/mutations/cartLinesAdd) mutation Adds a merchandise line to the cart. * [cart​Lines​Remove](https://shopify.dev/docs/api/storefront/2024-10/mutations/cartLinesRemove) mutation Removes one or more merchandise lines from the cart. * [cart​Lines​Update](https://shopify.dev/docs/api/storefront/2024-10/mutations/cartLinesUpdate) mutation Updates one or more merchandise lines on a cart. * [cart​Note​Update](https://shopify.dev/docs/api/storefront/2024-10/mutations/cartNoteUpdate) mutation Updates the note on the cart. * [cart​Selected​Delivery​Options​Update](https://shopify.dev/docs/api/storefront/2024-10/mutations/cartSelectedDeliveryOptionsUpdate) mutation Update the selected delivery options for a delivery group. *** ## <\~> CartWarning Mutations ### Mutated by * <\~>[cart​Attributes​Update](https://shopify.dev/docs/api/storefront/2024-10/mutations/cartAttributesUpdate) * <\~>[cart​Buyer​Identity​Update](https://shopify.dev/docs/api/storefront/2024-10/mutations/cartBuyerIdentityUpdate) * <\~>[cart​Create](https://shopify.dev/docs/api/storefront/2024-10/mutations/cartCreate) * <\~>[cart​Discount​Codes​Update](https://shopify.dev/docs/api/storefront/2024-10/mutations/cartDiscountCodesUpdate) * <\~>[cart​Gift​Card​Codes​Update](https://shopify.dev/docs/api/storefront/2024-10/mutations/cartGiftCardCodesUpdate) * <\~>[cart​Lines​Add](https://shopify.dev/docs/api/storefront/2024-10/mutations/cartLinesAdd) * <\~>[cart​Lines​Remove](https://shopify.dev/docs/api/storefront/2024-10/mutations/cartLinesRemove) * <\~>[cart​Lines​Update](https://shopify.dev/docs/api/storefront/2024-10/mutations/cartLinesUpdate) * <\~>[cart​Note​Update](https://shopify.dev/docs/api/storefront/2024-10/mutations/cartNoteUpdate) * <\~>[cart​Selected​Delivery​Options​Update](https://shopify.dev/docs/api/storefront/2024-10/mutations/cartSelectedDeliveryOptionsUpdate)