Laravel eCommerce headless APIs allow you to experience seamless and easily scalable storefront performance.

Overview

Bagisto GraphQL API

Laravel eCommerce headless APIs allow you to experience seamless and easily scalable storefront performance. An open-source and GraphQL based Rest API Laravel platform delivering ultra-fast, dynamic, and personalized shopping experiences.

Read our documentation: Bagisto GraphQL API Docs

The Bagisto GraphQL API is made in collaboration with Ucraft Team

1. Requirements:

  • Bagisto: v1.3.3

2. Installation:

  • Unzip the respective extension zip and then merge "packages" folder into project root directory.

Goto config/app.php file and add following line under 'providers'

    Webkul\GraphQLAPI\Providers\GraphQLAPIServiceProvider::class

Goto composer.json file and add following line under 'psr-4'

    "Webkul\\GraphQLAPI\\": "packages/Webkul/GraphQLAPI"

Run the below mentioned commands from the root directory in terminal:

    composer dump-autoload
    php artisan optimize
    php artisan bagisto_graphql:install

Find a file config/lighthouse.php from root and do the following changes:

  • change the guard index value from api to admin-api like below mentioned:
    'guard' => 'admin-api',
  • change the path from 'graphql/schema.graphql' to 'packages/Webkul/GraphQLAPI/graphql/schema.graphql' for the register index under schema array index like below mentioned:
    'schema' => [
        'register' => base_path('packages/Webkul/GraphQLAPI/graphql/schema.graphql'),
    ],
  • change the App\GraphQL\ path to Webkul\GraphQLAPI\ in all the indexes of namespace index:
    'namespaces' => [
        'models' => ['App', 'Webkul\\GraphQLAPI\\Models'],
        'queries' => 'Webkul\\GraphQLAPI\\Queries',
        'mutations' => 'Webkul\\GraphQLAPI\\Mutations',
        'subscriptions' => 'Webkul\\GraphQLAPI\\Subscriptions',
        'interfaces' => 'Webkul\\GraphQLAPI\\Interfaces',
        'unions' => 'Webkul\\GraphQLAPI\\Unions',
        'scalars' => 'Webkul\\GraphQLAPI\\Scalars',
        'directives' => ['Webkul\\GraphQLAPI\\Directives'],
        'validators' => ['Webkul\\GraphQLAPI\\Validators'],
    ],
  • Add the JWT_TTL (JWT time to live) entry in the .env file under the JWT_SECRET key:
    JWT_TTL=525600

Now to use the graphql-playground for testing the APIs:

    http://example.com/graphql-playground

To check the customer's API (front APIs), you have to put all the shop schemas at the end in the schema file (i.e. packages/Webkul/GraphQLAPI/graphql/schema.graphql).

    put all shop schemas #import /shop/*/*.graphql after #import /promotion/*.graphql this line.

Or you can also use the Postmen for testing the APIs:

    http://example.com/graphql

That's it, now just execute the project on your specified domain.

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website.

Comments
  • #44 Fix - incompatible declaration Product::getTypeInstance()

    #44 Fix - incompatible declaration Product::getTypeInstance()

    Fixes issue #44

    by updating

    \Webkul\GraphQLAPI\Models\Catalog\Product::getTypeInstance
    

    declaration, and making it compliant with Bagisto 1.3.3.

    Basically the new version has return types, which are required now in packages extending the base model(s).

    This update doesn't update all return types, of every method, but only the one required to run composer scripts without errors.

    opened by funder7 5
  • JS on storefront

    JS on storefront

    Hi Bagistos!

    We want to develop an integration for Bagisto and we need to have the option to add custom JS on storefront. Can you please point me to the relevant API?

    enhancement Fixed 
    opened by erezson 5
  • Getting Error while creating attribute family in Postman, In Admin Panel we are able to see the Family Created.

    Getting Error while creating attribute family in Postman, In Admin Panel we are able to see the Family Created.

    Issue Description

    When we create a new Attribute Family via API in Postman, there we can see that the error is appearing after hitting the API. After the API hit when we check the Admin Panel there we can see that the attribute family is created.

    Bagisto Version

    V1.4.3

    Steps To Reproduce

    1. Go to Postman -> Catalog API Collection -> Attributes Family Section -> Create New Attribute Family.
    2. There when we fill the data and hit the API, then we can see the error appearing.
    3. After that when we check the Admin section there we can see the Family is created.

    Actual Result

    Please check the below screenshot and video for a better understanding of the concern.

    POSTMAN COLLECTION Screenshot from 2022-08-22 15-51-38

    Video

    https://user-images.githubusercontent.com/92721837/185899170-527365bd-eb63-4016-bf75-f58508906314.mp4

    Expected Result

    We should be able to create a new family without the error appearing in the API. The details should be correct in the API. when we hit the API it should not throw any error.

    bug Fixed 
    opened by ashishkumar-webkul 4
  • Issues with GraphQL API in a  fresh bagisto installation

    Issues with GraphQL API in a fresh bagisto installation

    Hello,

    I'm new to laravel and bagisto and i would like to request your assistance on the following issue that i'm facing. I have installed bagisto in a docker container (it includes all the prerequisites) and it works as expected. However, i would like to have admin access via API in order to be able to manipulate customer profiles (add, update, remove e.t.c ) from another app. After consulting the documentation, i've stumbled upon the GraphQLAPI that bagisto offers. So, i've proceeded with the installation as instructed in bagisto/headless-ecommerce. Please find below my steps: Screenshot 2021-12-01 at 3 54 07 PM

    Screenshot 2021-12-01 at 3 55 30 PM

    Screenshot 2021-12-01 at 3 58 51 PM

    Then,

    Screenshot 2021-12-01 at 4 01 16 PM Screenshot 2021-12-01 at 4 01 36 PM Screenshot 2021-12-01 at 4 01 51 PM

    And finally,

    Screenshot 2021-12-01 at 4 03 55 PM

    Screenshot 2021-12-01 at 4 04 56 PM

    Screenshot 2021-12-01 at 4 06 00 PM

    Unfortunately, i'm unable to access the graphql API. Below you may find the errors that i'm receiving both in Postman and GraphQL Playground

    Screenshot 2021-12-01 at 3 50 07 PM Screenshot 2021-12-01 at 3 52 28 PM

    Could you kindly let me know if i'm missing any essential step during the process? Thank you very much for your time.

    opened by AxilleasMoukoulis 3
  • Interface

    Interface "Tymon\JWTAuth\Contracts\JWTSubject" not found

    Description

    Installation bagisto/graphql-api dependency fails. I've successfully setup and started bagisto v1.4.3, but installing bagisto/graphql-api dependency throws an error. Same issue happens with latest version of bagisto, but the README says to have v1.4.3.

    Steps

    # Git version 2.37.1 (Apple Git-137.1)
    git clone -b v1.4.3 https://github.com/bagisto/bagisto.git
    
    # Composer version 2.4.4 2022-10-27 14:39:29
    composer install
    
    # Composer version 2.4.4 2022-10-27 14:39:29
    composer require bagisto/graphql-api
    
    image
    opened by kholbek 2
  • Need to Update the details in the Codes for the proper working of the Marketing Section.

    Need to Update the details in the Codes for the proper working of the Marketing Section.

    Bagisto - V1.4.3

    Description When we are checking the details of the Marketing Section there we can see that the details are not appearing for the Sitemaps and Email Templates. When checking the Codes it was found that the following path is having some data missing. Need to Add the following data for the proper working of the API.

    PATH - vendor/bagisto/graphhql-api/src/graphql/schema.graphql

    Add the following #import /marketing/*.graphql

    For Reference consider the screenshot

    Screenshot from 2022-09-12 17-44-34

    bug Fixed 
    opened by ashishkumar-webkul 2
  • Shop API Collection -> Customer Wishlist -> Unable to Fetch the details of the Customer's Wishlist Details.

    Shop API Collection -> Customer Wishlist -> Unable to Fetch the details of the Customer's Wishlist Details.

    Issue Description

    When checking the list of customer's wishlist Detail and when we are fetching the data of the Detail we are unable to do so, we are getting error for the same.

    Bagisto Version

    V1.4.3

    Steps To Reproduce

    1. Go To Postman -> Shop API Collection -> Customer's Wishlist -> Get Customer Detail.
    2. There we are facing some issues in fetching the Data.

    Actual Result

    Please check the below video for a better understanding of the concern.

    Video

    https://user-images.githubusercontent.com/92721837/186395481-602f100f-bc23-44a6-9982-064279a2895d.mp4

    Expected Result

    The details must be fetched when checking the details of the wishlist for the customer.

    bug Fixed 
    opened by ashishkumar-webkul 2
  • In Shop API - Customer Addresses - We are unable to Remove the data of the customer addresses.

    In Shop API - Customer Addresses - We are unable to Remove the data of the customer addresses.

    Issue Description

    When checking the addresses related concern with the API, and then we want to remove the customer address, we have logged in as a customer and then check and remove the address, but we are unable to remove the address.

    Bagisto Version

    V1.4.3

    Steps To Reproduce

    1. Go to Postman -> Shop API Collection -> Customer Addresses -> Remove Customer Address.
    2. Here when we pass the details with customer login Bearer token, we are unable to remove the address.

    Actual Result

    Please check the below video for a better understanding of the concern.

    Video

    https://user-images.githubusercontent.com/92721837/186370230-4712b431-8ce1-43e2-8166-96b87348f1a1.mp4

    Expected Result

    The API should work properly and also the address must be removed.

    bug Fixed 
    opened by ashishkumar-webkul 2
  • In Shop API - Customer Addresses - We are unable to update the data of the customer addresses.

    In Shop API - Customer Addresses - We are unable to update the data of the customer addresses.

    Issue Description

    When checking the addresses related concern with the API, and Updating the details of the customer address, we are unable to update the address, after inserting the token and address id.

    Bagisto Version

    V1.4.3

    Steps To Reproduce

    1. Go to Postman -> Shop API Collection -> Customer Addresses -> Update Customer Address.
    2. Here when we pass the details with customer login Bearer token, we are unable to update.

    Actual Result

    Please check the below video for a better understanding of the concern.

    Video

    https://user-images.githubusercontent.com/92721837/186364968-a5d0e9a1-cd2c-4866-a537-b649bab9323d.mp4

    Expected Result

    The details must updated when we feed the data in the API and then hit it.

    bug Fixed 
    opened by ashishkumar-webkul 2
  • In Shop API - Customer Addresses - We are unable to fetch the data of the customer addresses.

    In Shop API - Customer Addresses - We are unable to fetch the data of the customer addresses.

    Issue Description

    When checking the customer details via API, there when we check the Get Customer address API, we are unable to fetch the data.

    Bagisto Version

    V1.4.3

    Steps To Reproduce

    1. Go to Postman -> Shop API Collection -> Customer Addresses -> Get Customer Addresses List.
    2. Here when we pass the details with customer login Bearer token, we are unable to fetch the data.
    3. Same I have tried to fetch the data with admin's token then also the same issue.

    Actual Result

    Please check the below video for a better understanding of the concern.

    Video

    https://user-images.githubusercontent.com/92721837/186358470-468add1c-2392-4986-a53a-95aa4c93a8bc.mp4

    Expected Result

    The details must appear when we pass the token to Get the Addresses detailed List.

    bug Fixed 
    opened by ashishkumar-webkul 2
  • In Shop API - Customer Account - We are unable to Update the details of the Customer Account.

    In Shop API - Customer Account - We are unable to Update the details of the Customer Account.

    Issue Description

    When checking the customer details via API, after that when we check the API of the Update customer account in API, we are facing issues while updating the details.

    Bagisto Version

    V1.4.3

    Steps To Reproduce

    1. Go to Postman -> Shop API Collection -> Customer Account -> Update Account Details.
    2. Here when we pass the details with customer login Bearer token, we are unable to Update the data.

    Actual Result

    Please check the below video for a better understanding of the concern.

    Video

    https://user-images.githubusercontent.com/92721837/186342172-f0d8d3ae-9c45-49d0-b86b-b47967ea05a4.mp4

    Expected Result

    The details must appear when we pass the token to the Update Customer Detail API. The details must be updated as per the data what we have sent.

    bug Fixed 
    opened by ashishkumar-webkul 2
  • how can i override mutation

    how can i override mutation

    i want to modify query [ remove password field from query ], and remove below exception handling in /src/Mutations/Shop/Customer/SessionMutation.php file throw new CustomException( trans('shop::app.customer.login-form.invalid-creds'), 'Invalid Email and Password.' ); and return custom message on invalid credentials, because above exaptation send error on invalid credentials.

    opened by Jatinkabariya 0
Releases(v1.4.4)
  • v1.4.4(Dec 15, 2022)

    :sparkles: Enhancements

    • Added multi-currency and locale support, (use x-currency and x-locale in the request header).

    :bug: Bug Fixes

    • Fixed getting an issue in notifications (https://prnt.sc/c2Oj8RZQktCR).
    Source code(tar.gz)
    Source code(zip)
  • v1.4.3(Dec 12, 2022)

    :sparkles: Enhancements

    • Order Cancellation API query added for log-in customer.

    • Social Login sign-up created for the TrueCaller.|

    • Push Notification List and Send APIs added.

    • Push Notification section added at the Bagisto admin.

    • Added category filters and sorting.

    • Compatible with v1.4.3.

    :bug: Bug Fixes

    • Fixed type hinting initial push for compatibility.

    • Interface "Tymon\JWTAuth\Contracts\JWTSubject" not found.

    Source code(tar.gz)
    Source code(zip)
  • v1.3.3(Aug 12, 2022)

  • v1.3.0(Apr 12, 2022)

    :sparkles: Enhancements

    • APIs support for the VueStoreFront.

    • APIs support for the Next.js Commerce.

    • APIs created for the Shop content (i.e. product by slug, new and featured product, order authentication, etc..).

    • APIs added for the PayPal Standard Payment gateway.

    • CacheImage schema added.

    • Sorting product list and filter options added for the category.

    Source code(tar.gz)
    Source code(zip)
  • v1.1.0(Dec 7, 2021)

    :sparkles: Enhancements

    • Product Number Attribute added to Product Schema.

    • Product Videos support added to Product Schema.

    • Email and Gender fields support added to Customer's address Schema.

    • Note field support added to Customer Schema.

    • New Postman APIs sample added to the package.

    :bug: Bug Fixes

    • #47 - Issues with GraphQL API in a fresh bagisto installation.

    • #46 - RegistrationEmail Missing second parameters.

    • #44 - Error after updating Bagisto to 1.3.3 (from Product::getTypeInstance()).

    • #43 - Link to download and install it, must availbale in bagisto doc.

    • #42 - Replace images files hosted externally in README.md

    • #41 - Product update mutation not working properly.

    • #40 - No commands defined in the "bagisto_graphql" namespace.

    • #38 - composer support.

    • #37 - Implemented API for adding JS on storefront.

    Source code(tar.gz)
    Source code(zip)
  • v1.0.0(Apr 27, 2021)

    Laravel eCommerce headless APIs allow you to experience seamless and easily scalable storefront performance. An open-source and GraphQL based Rest API Laravel platform delivering ultra-fast, dynamic, and personalized shopping experiences.

    Source code(tar.gz)
    Source code(zip)
Owner
Bagisto
A Free and Opensource laravel eCommerce framework built for all to build and scale your business.
Bagisto
GetCandy - A headless E-Commerce API built on top of Laravel.

A headless E-Commerce API built on top of Laravel. Build amazing online stores with full control over functionality and user experience using headless

GetCandy 438 Jan 4, 2023
PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

PrestaShop is an Open Source e-commerce web application, committed to providing the best shopping cart experience for both merchants and customers. It is written in PHP, is highly customizable, supports all the major payment services, is translated in many languages and localized for many countries, has a fully responsive design (both front and back office), etc. See all the available features.

PrestaShop 6.9k Dec 31, 2022
Topshop offers its customers a modern shopping experience by bringing computers, appliances, clothing and many other items at their fingertips.

Topshop offers its customers a modern shopping experience by bringing computers, appliances, clothing and many other items at their fingertips. With just a few clicks, users can create an account, add products to their cart and place their order.

Abhijeet Pitumbur 2 Aug 8, 2022
PrestaShop is a fully scalable open source e-commerce solution.

PrestaShop is an Open Source e-commerce web application, committed to providing the best shopping cart experience for both merchants and customers.

PrestaShop 6.9k Jan 9, 2023
Aimeos PHP e-commerce framework for ultra fast online shops, scalable marketplaces, complex B2B applications

Aimeos is an Open Source e-commerce framework for online shops consisting of the e-commerce library, the administration interface and different front-ends. It's a modular stack that offers an unmatched combination of flexibility and speed.

Aimeos 2.6k Dec 30, 2022
A Free and Opensource Laravel eCommerce framework built for all to build and scale your business.

Bagisto is a hand tailored E-Commerce framework built on some of the hottest opensource technologies such as Laravel (a PHP framework) and Vue.js a progressive Javascript framework.

Bagisto 5k Jan 5, 2023
Laravel eCommerce Pre Order Extension allows the customers and guest users to pre-order the upcoming product and out of stock products.

Introduction Bagisto Pre-order add-on allows the customer to pre-order products which are not yet available at the online store. With the help of Bagi

Bagisto 3 May 31, 2022
AbanteCart is a free PHP based eCommerce solution for merchants to provide ability creating online business and sell products online quick and efficient.

AbanteCart is a free PHP based eCommerce solution for merchants to provide ability creating online business and sell products online quick and efficient. AbanteCart application is built and supported by experienced enthusiasts that are passionate about their work and contribution to rapidly evolving eCommerce industry. AbanteCart is more than just a shopping cart, it is rapidly growing eCommerce platform

AbanteCart 129 Nov 15, 2022
The Laravel eCommerce Image Gallery allows the admin to add/manage images into various galleries and galleries into various groups according to requirements.

The Laravel eCommerce Image Gallery allows the admin to add/manage images into various galleries and galleries into various groups according to requirements.

Bagisto 2 May 31, 2022
Shopware 6 is an open source ecommerce platform based on a quite modern technology stack that is powered by Symfony and Vue.js.

Shopware 6 Realize your ideas - fast and without friction. Shopware 6 is an open source ecommerce platform based on a quite modern technology stack th

Shopware 2.1k Dec 31, 2022
Ecommerce website for Sales of Product according to their categories and Tags with pictures

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Muhammad Fahad 1 Nov 8, 2021
Antvel is an ecommerce project written in Laravel 5.* intended for building a friendly eStore either for startups or big companies.

Antvel is an ecommerce project written in Laravel 5.* intended for building a friendly eStore either for startups or big companies.

Antvel - Official 650 Dec 28, 2022
Payu payment gateway for bagisto laravel ecommerce open source platform

Bagisto Payu Payment Gateway Payu is a popular payment gateway in india. This package provides a additional strong help for the user to use the payu p

Saju G 3 Dec 14, 2021
(Live Link) Extensive ecommerce site with vendors, mods & ability to add to cart without being logged in. Upgraded to Laravel 8.x

(Live Link) Extensive ecommerce site with vendors, mods & ability to add to cart without being logged in. Upgraded to Laravel 8.x

null 14 Dec 21, 2022
The Laravel eCommerce DHL Shipping module module calculates the shipping rates based on DHL API for product shipping.

Introduction DHL Shipping Add-on provides DHL Shipping methods for shipping the product. It packs in lots of demanding features that allows your busin

Bagisto 1 May 31, 2022
The Laravel eCommerce Mollie Payment Gateway allows the merchants to integrate Mollie payment gateway to their bagisto Store.

The Laravel eCommerce Mollie Payment Gateway allows the merchants to integrate Mollie payment gateway to their bagisto Store.

Bagisto 2 May 31, 2022
Build a simple ecommerce website with Laravel.

Simple Ecommerce Build a simple ecommerce website with Laravel. Explore the docs » View Demo · Report Bug · Request Feature Table of Contents Getting

Rif 0 Jul 1, 2022
Open Source eCommerce Platform on Symfony

Sylius is an Open Source eCommerce platform on top of Symfony. The highest quality of code, strong testing culture, built-in Agile (BDD) workflow and

Sylius eCommerce 7.2k Jan 3, 2023
PrestaShop module that allows an ecommerce/brand to display its physical retailers in a map

PrestaShop module that allows an ecommerce/brand to display its physical retailers in a map Features Free of charge: instead of using pa

Darío Scattolini 3 Apr 15, 2022