# Adding category metafields via GraphQL Admin API

**URL:** <https://community.shopify.dev/t/adding-category-metafields-via-graphql-admin-api/3132>\
**Category:** Custom Data\
**Tags:** metafields\
**Created:** [November 26, 2024, 9:18pm UTC](https://community.shopify.dev/t/adding-category-metafields-via-graphql-admin-api/3132 "2024-11-26T21:18:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Agustin\_Garcinuno](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@Agustin\_Garcinuno](https://community.shopify.dev/u/Agustin_Garcinuno)\
**Post date:** [November 26, 2024, 9:18pm UTC](https://community.shopify.dev/t/adding-category-metafields-via-graphql-admin-api/3132/1 "2024-11-26T21:18:21Z")

</div>

Heyo anyone know if there’s a way to add the pre-defined Shopify category metafields when creating a product through the GraphQL API? Referring to the “attributes” here:

[https://shopify.github.io/product-taxonomy/releases/2024-07/?categoryId=sg-4-17-2-17](https://shopify.github.io/product-taxonomy/releases/2024-07/?categoryId=sg-4-17-2-17)

with IDs like gid://shopify/TaxonomyValue/19404

Read a few threads saying its not possible but just wanna double check bc itd be a total bummer as it makes integrating with existing operations a little hard depending on how they filter for products etc

---

<div class="post-metadata">

**Author:** ![Liam-Shopify](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/liam-shopify/32/6_2.png) [@Liam-Shopify](https://community.shopify.dev/u/Liam-Shopify)\
**Post date:** [November 28, 2024, 5:53pm UTC](https://community.shopify.dev/t/adding-category-metafields-via-graphql-admin-api/3132/2 "2024-11-28T17:53:14Z")

</div>

Hi Agustin,

Metafields can be passed in during the productCreate mutation: [ProductCreateInput - GraphQL Admin](https://shopify.dev/docs/api/admin-graphql/2024-10/input-objects/ProductCreateInput#field-metafields)

However you’ll need to have the metaobject entries created first.
