PHPackages                             mageplaza/module-free-gifts-graphql - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. mageplaza/module-free-gifts-graphql

ActiveMagento2-module[API Development](/categories/api)

mageplaza/module-free-gifts-graphql
===================================

Magento 2 Free Gifts GraphQl Extension

1.0.1(5y ago)321.4k—4.2%1[1 issues](https://github.com/mageplaza/magento-2-free-gifts-graphql/issues)proprietaryPHP

Since Feb 28Pushed 5y ago4 watchersCompare

[ Source](https://github.com/mageplaza/magento-2-free-gifts-graphql)[ Packagist](https://packagist.org/packages/mageplaza/module-free-gifts-graphql)[ RSS](/packages/mageplaza-module-free-gifts-graphql/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)DependenciesVersions (4)Used By (0)

Magento 2 Free Gifts GraphQL
============================

[](#magento-2-free-gifts-graphql)

Magento 2 Free Gifts will add to your customers' shopping journey a surprise and delight moment. Notably, **Magento Free Gifts GraphQL is a part of the Mageplaza Free Gift extension that adds GraphQL features; this supports PWA studio.**

[Mageplaza Free Gifts for Magento 2](https://www.mageplaza.com/magento-2-free-gifts/) is a handy tool that simplifies the process of giving away free gifts to customers on the online store.

The biggest advantage of offering free gifts is to improve customer experience and boost sales. Depending on the store owners' purposes or strategies, they can provide customers with free gift when they purchase a specific product. Usually, free gifts can be used to gather customers' attention to a new product or a sale program. Free gifts are an incentive that stimulates customers' purchasing decisions and builds their retention.

The free gifts are designed to display on the Product page and Shopping Cart page, which is good for store owners to avoid customers from abandoning their carts right before the checkout. In case the free gifts are offered as discount coupons, customers can get the gifts and apply them to their order right away. The extension also enables customers to freely select free gifts and change the gift they choose from the list to get the most like ones.

The store admin can set the rules to reward gifts to customers based on product attributes and cart attributes. For example, if the cart's subtotal is more than $100, they will be given free gifts.

Another method is setting the conditions based on the order value of customers to apply the free gifts. In other words, it's determining the prices of gifts, which can be set in three ways: free, discount by percent, and fixed prices. For example, if one's order reaches $1000, he will get one more item free or 20% off for two items. Free shipping is another appealing gift that many customers look for when shopping online, and you can add this offer to your store's gift list on the fly.

1. How to install
-----------------

[](#1-how-to-install)

Run the following command in Magento 2 root folder:

```
composer require mageplaza/module-free-gifts-graphql
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy

```

**Note:** Magento 2 Free Gifts GraphQL requires installing [Mageplaza Free Gifts](https://www.mageplaza.com/magento-2-free-gifts/) in your Magento installation.

2. How to use
-------------

[](#2-how-to-use)

To start using **Freegifts GraphQL** in your Magento 2 store, you need to:

- Use Magento 2.3.x or higher. Return your site to developer mode
- Set **GraphQL endpoint** as `http:///graphql` in url box, click **Set endpoint**. (e.g. )
- Perform a query in the left cell then click the **Run** button or **Ctrl + Enter** to see the result in the right cell
- Currently, Mageplaza Free Gifts extension support the following queries and mutations:

    - Query `mpFreeGiftsByProductSku`: Help to get the free gift by product SKU

    [![](https://camo.githubusercontent.com/ecc9d6fe96db0732d167f443f67a3967d1db88f0ba97d4c6682fdefb8dc90c60/68747470733a2f2f696d6775722e636f6d2f7a3834447375342e706e67)](https://camo.githubusercontent.com/ecc9d6fe96db0732d167f443f67a3967d1db88f0ba97d4c6682fdefb8dc90c60/68747470733a2f2f696d6775722e636f6d2f7a3834447375342e706e67)

    - Query `mpFreeGiftsByQuoteItem`: Help to get the free gift by quote item Id

    [![](https://camo.githubusercontent.com/d694cc095065d6d8292a7fe01ecfd837f7d37046a49da460b072949a9ca7a147/68747470733a2f2f696d6775722e636f6d2f315561496a50592e706e67)](https://camo.githubusercontent.com/d694cc095065d6d8292a7fe01ecfd837f7d37046a49da460b072949a9ca7a147/68747470733a2f2f696d6775722e636f6d2f315561496a50592e706e67)

    - Mutation `mpFreeGiftsAddByGiftId`: Help to add free gift by gift Id

    [![](https://camo.githubusercontent.com/ae8495b6870b9eece21a0fb03e3de4709292ae3707827f177c67c5663a8c1d58/68747470733a2f2f696d6775722e636f6d2f656f73686734552e706e67)](https://camo.githubusercontent.com/ae8495b6870b9eece21a0fb03e3de4709292ae3707827f177c67c5663a8c1d58/68747470733a2f2f696d6775722e636f6d2f656f73686734552e706e67)

    - Mutations `mpFreeGiftsDeleteByQuoteItem`: Help to delete free gift by quote item Id

    [![](https://camo.githubusercontent.com/334467a4f28167253bbcb9d9ba0bf483e7803f7c281c7744604ca8f265f70842/68747470733a2f2f696d6775722e636f6d2f4d6e4a555032762e706e67)](https://camo.githubusercontent.com/334467a4f28167253bbcb9d9ba0bf483e7803f7c281c7744604ca8f265f70842/68747470733a2f2f696d6775722e636f6d2f4d6e4a555032762e706e67)

3. Devdocs
----------

[](#3-devdocs)

- [Magento 2 Free Gifts API &amp; examples](https://documenter.getpostman.com/view/10589000/SzRyzpwv?version=latest)
- [Magento 2 Free Gifts GraphQL &amp; examples](https://documenter.getpostman.com/view/10589000/SzRyzpwr?version=latest)

Click on Run in Postman to add these collections to your workspace quickly.

[![Magento 2 blog graphql pwa](https://camo.githubusercontent.com/e7f65a0b84e1cb704e6b107ed5db505a482e80c8ffd66afbbab83eea50f482ac/68747470733a2f2f692e696d6775722e636f6d2f6c6873586c55522e676966)](https://camo.githubusercontent.com/e7f65a0b84e1cb704e6b107ed5db505a482e80c8ffd66afbbab83eea50f482ac/68747470733a2f2f692e696d6775722e636f6d2f6c6873586c55522e676966)

4. Documentation
----------------

[](#4-documentation)

- Installation guide:
- User guide:
- Report a security issue to

5. Contribute to this module
----------------------------

[](#5-contribute-to-this-module)

Feel free to **Fork** and contribute to this module. You can also create a pull request, so we will merge your changes in the main branch.

6. Get Support
--------------

[](#6-get-support)

- Feel free to contact us if you have any further questions.
- If you find this project helpful, please give us a **Star** [![star](https://camo.githubusercontent.com/ccfd05f7d28636d95a2b75c75567ef6df2f29f02f913234e692ea748b3032981/68747470733a2f2f692e696d6775722e636f6d2f5338653063744f2e706e67)](https://camo.githubusercontent.com/ccfd05f7d28636d95a2b75c75567ef6df2f29f02f913234e692ea748b3032981/68747470733a2f2f692e696d6775722e636f6d2f5338653063744f2e706e67)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~359 days

Total

2

Last Release

1912d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2810172?v=4)[Sam Ng](/maintainers/imsamthomas)[@imsamthomas](https://github.com/imsamthomas)

![](https://www.gravatar.com/avatar/791d20a969b428c77a439388be23f94f3ce34d9cbc8ecd09bfccdb7e41b5d7ca?d=identicon)[haitv282](/maintainers/haitv282)

---

Top Contributors

[![Desmond-Mageplaza](https://avatars.githubusercontent.com/u/42972984?v=4)](https://github.com/Desmond-Mageplaza "Desmond-Mageplaza (11 commits)")[![bdtrung](https://avatars.githubusercontent.com/u/38638387?v=4)](https://github.com/bdtrung "bdtrung (4 commits)")[![JackerNgo](https://avatars.githubusercontent.com/u/19358665?v=4)](https://github.com/JackerNgo "JackerNgo (3 commits)")[![bichnn06](https://avatars.githubusercontent.com/u/51898883?v=4)](https://github.com/bichnn06 "bichnn06 (3 commits)")[![Victor-Mageplaza](https://avatars.githubusercontent.com/u/53899645?v=4)](https://github.com/Victor-Mageplaza "Victor-Mageplaza (2 commits)")[![imsamthomas](https://avatars.githubusercontent.com/u/2810172?v=4)](https://github.com/imsamthomas "imsamthomas (1 commits)")[![Rainy234](https://avatars.githubusercontent.com/u/42835440?v=4)](https://github.com/Rainy234 "Rainy234 (1 commits)")[![brianmageplaza](https://avatars.githubusercontent.com/u/7621931?v=4)](https://github.com/brianmageplaza "brianmageplaza (1 commits)")

---

Tags

free-giftsgraphqlmagentomagento-installationpwa

### Embed Badge

![Health badge](/badges/mageplaza-module-free-gifts-graphql/health.svg)

```
[![Health](https://phpackages.com/badges/mageplaza-module-free-gifts-graphql/health.svg)](https://phpackages.com/packages/mageplaza-module-free-gifts-graphql)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
