Cannot query field "metaobject" on type "Shop"

Hello team,

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.

Thanks @Paige-Shopify I’ll give that a try now, looks like I need to update the CLI too.

Hi @Paige-Shopify I’m having another strange issue now on my development store, I’ve created a new app owned metaobject definition (called settings) via the TOML file, which I have deployed, and confirmed it’s existence via the metaobjectDefinitions GQL query but when I attempt to write to it via the metaobjectUpsert mutation I get the following -

"No metaobject definition exists for type \"app--MY_APP_ID--settings\""

Disregard, it looks like it was just the fact that I named it “settings” that appears to be reserved or something like that as it worked as soon as I gave it another name.