Introducing Function Handles in Shopify Functions
With the release of Shopify's 2025-10 API version, developers can now use custom, app-scoped handles instead of globally unique function IDs for GraphQL mutations. This enhancement simplifies processes and provides greater consistency across environments.
How Function Handles Work
Previously, developers had to rely on querying for the latest functionId to create or update function owners. Function handles, defined in your shopify.extension.toml file, eliminate the need for this query because they are stable across environments and scoped to your app.
Updated GraphQL Mutation Requirements
Developers can now pass functionHandle during GraphQL mutations. However, it's important to note:
- Only one identifier—either
functionIdorfunctionHandle—should be provided per call. - Providing both
functionIdandfunctionHandlein a single mutation will result in a user error.
Benefits of Using Function Handles
- Function handles are stable, reducing the need for querying the latest function ID at runtime.
- They simplify workflows for creating and managing function owners.
- Environment consistency is improved, which supports smoother integrations.
No Immediate Developer Action Required
Your existing integrations using functionId will continue to work without interruption. However, we recommend updating your code to use functionHandle for future-proofing and reduced complexity. Here's what you can do:
- Remove any code that queries for
functionIdat runtime. - Directly use the
functionHandledefined in yourshopify.extension.tomlfile within GraphQL mutations.
Formal deprecation timelines for functionId will be announced in a future update.
Example Usage of Function Handles
Define the function handle in your shopify.extension.toml file:
[[extensions]]
name = "Payment Customization Function"
handle = "YOUR_FUNCTION_HANDLE"
type = "function"Then, use the handle in a GraphQL mutation:
mutation {
paymentCustomizationCreate(
paymentCustomization: {
title: "Payment Customization Title",
enabled: true,
functionHandle: "YOUR_FUNCTION_HANDLE",
}
) {
paymentCustomization {
id
}
userErrors {
message
}
}
}By making these updates, you can take full advantage of the stability and flexibility offered by function handles in Shopify Functions.