How to create metafields with reserved prefixes from checkout extension React code

I’m working on a checkout ui extension that adds extra fields to the checkout and I’m trying to use reserved prefixes to make the metafields that are created by my app unique. I don’t seem to really know how to do that and I can’t find any docs for it.

Here’s what I’ve thus far, this doesn’t work by the way

const FOO_METAFIELD_NAMESPACE = "$app:FOO";
const FOO_METAFIELD_KEY = "foo_key";

Hi Turbofan1178,

I don’t think you need to include $app at the beginning - any metafield you app creates should automatically have your apps unique ID. Could you use the metafieldDefinitionCreate mutation for your use case?

Okay, gotcha.

However, how can I call that mutation from a checkout ui extension React code?