How to Use FilterEqualTypeInput and FilterMatchTypeInput with GraphQl Magento 2?

Magento has an out of the box GraphQl feature that will be useful for the storefront API to interact with third-party software.

Sometimes you have checked the syntax of FilterEqualTypeInput and FilterMatchTypeInput in a schema.graphql file of the Graphql module.

This syntax is used to filter the GraphQl Query with Custom Attribute type.

Continue reading “How to Use FilterEqualTypeInput and FilterMatchTypeInput with GraphQl Magento 2?”

Get sales order data using Graphql in Magento 2.

GraphQL is a new concept from Magento 2.3 version in Magento eCommerce. Using Graphql we can get sales order data. There are many default core module uses GraphQl for getting data like, Product, CMS Page, and Block, Customer module uses Graphql for getting data of a specific entity. Magento Doesn’t use GraphQl for Sales Specific entity in core module.

I have just demonstrated how to get order data using GraphQl in Magento 2 based on order id. We can get details of Order basic entity, billing address and shipping address and Used items in Order.

Continue reading “Get sales order data using Graphql in Magento 2.”

How to get orders list by customer id in graphql magento 2?

From Magento 2.4 Out of the box, Magento supports Customer Orders History using GraphQL.

You can check the syntax by clicking Retrieve all the Order list of a customer by GraphQL Query

Given Article is used for the learning of GraphQL Practice with Magento. I have written an article before Magento supports the Sales GraphQL feature in the core code.

How to get a list of orders of a customer using GraphQl Magento 2?

We need to create a simple module for getting all the order lists of Customer using GraphQl. Default Magento 2, We can easily get all the orders of a customer by fetch OrderRepository.

Using Graphql, You can get an order list of a specific registered customer by customer id.

We need to create a Resolver model and add our custom logic for getting all the Customer Order list. We will display all the orders of a customer in the response to the query.

I hope you are aware of What is GraphQl and how GraphQL is used in Magento 2 If You are new to GraphQL check the link for GraphQl in Magento 2.

Now we can start the module using Magento 2 to fetch all orders of a specific customer. Continue reading “How to get orders list by customer id in graphql magento 2?”