Line item properties not being sent to GraphQL i.e. not accessible as attributes

We are trying to access cart line “properties” in checkout extension functions. We were told by Shopify Support that properties were the same as line item attributes. However, we cannot access these properties using attributes in the checkout function. As an example, say we had a product called “WPI Chocolate” and it had a property of “discount”, we can’t access it from our function. The example is shown below:

<input type="hidden" name="properties[discount]" value="percent::45"  />

We have the input GraphQL as follows:

query Input {
  cart {
    lines {
      quantity

      attribute(key: "discount"){
         key
         value
      }

      merchandise {
        __typename
        ...on ProductVariant {
            id
        }
      }
    }
  }
}

However, the attribute always returns null or empty. The question is how can we access the property? Also, how would we access multiple properties/attributes using the same GraphQL query?

Just a little more info. Here is the result of the GraphQL query.

{
  "cart": {
    "lines": [
      {
        "quantity": 2,
        "attribute": null,
        "merchandise": {
          "__typename": "ProductVariant",
          "id": "gid://shopify/ProductVariant/45170063278355"
        }
      }
    ]
  }
}

It turns out that the theme I was using does not recognize the HTML tag:

<input type="hidden" name="properties[discount]" value="percent::45"  />

Instead, it was sending the properties as javascript formData as follows:

formData.append(‘properties[discount]’, ‘test123’);

So now it is working. My Bad.

{
  "cart": {
    "lines": [
      {
        "quantity": 1,
        "discount": {
          "key": "discount",
          "value": "test123"
        },
        "merchandise": {
          "__typename": "ProductVariant",
          "id": "gid://shopify/ProductVariant/45170063278355"
        }
     }
     ]
}