I’m currently trying to access a store metaobject from within a cart validation function. I read the docs and it appears to be possible. But when I try to run a typegen after adding it to the GQL input I get the following error:
Cannot query field "metaobject" on type "Shop". Did you mean "metafield"?
Looks like the Function is using an API version from before 2026-04, or its local schema hasn’t been refreshed after changing versions. Make sure shopify.extension.toml uses 2026-04 or later, then run this from the extension folder:
shopify app function schema
That refreshes schema.graphql. You can then retry shopify app dev, shopify app deploy, or shopify app function typegen.