How to add custom product attributes in GraphQL – Magento 2 / Adobe Commerce

This article explains how to add custom product attributes in product GraphQL so front end we can display that attribute information.

Here I am taking as an example of a custom attribute brand_info but you can add which attribute you want.

Let’s follow below instructions to add a custom attribute in GraphQL:

We need to create a “schema.graphqls” file inside your module at the below example path.

app/code/Learn/ProductGrapQl/etc/schema.graphqls
interface ProductInterface {
    brand_info: String @doc(description: "Brand Info of Product attribute label")
}

Thank you so much for reading this blog keep supporting me and I will come up with a new blog.

Please do comment for any query related this blog once again thank you.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *