MetafieldDefinitions query with number_integer type does not work

Trying to query MetafieldDefinitions with type:number_integer does not return any result, despite the store has already created a definition with type “Integer”

Query example :

query MetafieldDefinitions {
  metafieldDefinitions(ownerType: PRODUCTVARIANT, first: 5, query:"type:number_integer") {
    nodes {
      name
      namespace
      key
      type {
        name
      }
    }
  }
}

This response returned empty nodes, despite there’s a metafield definition already defined in Admin :

X-Request-ID : 343db3ac-f34e-4601-bc62-fed3c09b88d3-1754459181

Hi @soulchild

Thanks for including all this info, digging into this now and will update asap.

We’re not able to replicate this on our side, could there be something specific with this store that’s preventing the metafield data from being returned?

Hi Liam,

Thank you for looking into this! I have managed to pinpoint the issue, it seems like I needed to enable the “Use as a condition in smart collections” checkbox for the integer metafield to appear in the query

After I have enabled this, the query returned the metafield.

Thank you.