Shopify Functions Cannot query field "tags" on type "Customer"

Topic summary

Main issue: Migrating from Script Editor to Shopify Functions and needing to use customer tags to determine shipping options. In the new setup, querying customer tags in the Functions GraphQL input returns the error: “Cannot query field ‘tags’ on type ‘Customer’.”

Context: Previously, customer tags were accessible in Script Editor for shipping logic. The user is now querying the cart’s buyerIdentity (customer, purchasingCompany) and delivery options via GraphQL.

Evidence: A GraphQL query snippet for cart/buyerIdentity/deliveryGroups is provided, along with the exact error message. A Shopify Storefront API docs link (Cart object, 2024-04) is referenced to suggest tags should be queryable.

Request: Guidance on how to access or check customer tags within Shopify Functions (or an alternative approach) to replicate prior behavior for shipping selection.

Status: No resolution or workaround provided yet; awaiting clarification. Note: The code snippet and error message are central to understanding the issue.

Summarized with AI on December 27. AI used: gpt-5.

I was looking for assistance in a Shopify functions query. I was told we could no longer use Script editor, and I am in the process of migrating to the new functions platform.

One of the things we do when selecting a shipping line item is look at the customer’s tags. This was straightforward in the Shopify Script editor.

When I use the following graphql query:

query RunInput {
  cart {
    buyerIdentity {
      customer {
        id
      }
      purchasingCompany {
        company {
          id
        }
      }
    }

    deliveryGroups {
      deliveryOptions {
        handle
        title
      }
    }
  }
}

I get the following error:
Cannot query field “tags” on type “Customer”.

When reading the docs this should be a valid query:
https://shopify.dev/docs/api/storefront/2024-04/objects/Cart

Please advise,
Justin