Shopify function input query got 'input_query_validation_error'

extension/xxx/input.graphql

query Input {
  discountNode {
    metafield(namespace: "order-discount", key: "percentage") {
      value
    }
  }
  cart {
    cost {
      totalAmount{
        amount
      }
    }
    attributes {
      extra_credit
    }
    lines {
      quantity
      merchandise {
        ...on ProductVariant {
          id
        }
      }
    }
  }
}

when excute shpoify deploy,got the error

The deployment of functions failed with the following errors:
    [
      {
        "field": null,
        "message": "Field 'attributes' doesn't exist on type 'Cart' at 'query Input.cart.attributes'",
        "tag": "input_query_validation_error"
      }
    ]

but dev doc show that attributes is in cart
https://shopify.dev/api/functions/reference/order-discounts/graphql/common-objects/cart