Skip to content

metafield variables are not working for shop metafield for cart checkout validation function #377

@jaspreetAxt

Description

@jaspreetAxt

I have created metafiled on shop which is working fine. However am unable to pass the variables.
in RunInput $selectedProducts supposed to send the values but it is not.

query RunInput($selectedProductTags: [String!], $selectedCollectionIds: [ID!]) {
  cart {
    lines {
      quantity
      merchandise {
        __typename
        ... on ProductVariant {
          id
          weight
          product {
         
            hasTags(tags: $selectedProductTags) {
              hasTag
              tag
            }
          }
        }
      }
    }
  }
  shop {
    metafield(
      namespace: "$app:my_cart_checkout_shop_namespace"
      key: "my_cart_checkout_shop_key"
    ) {
      value
    }
  }
}

As mentioned in the doc that variables need to be declared into the toml file is already being declared

  [extensions.input.variables]
   namespace: "$app:my_cart_checkout_shop_namespace"
   key: "my_cart_checkout_shop_key"

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions