Coder Social home page Coder Social logo

bagisto / headless-ecommerce Goto Github PK

View Code? Open in Web Editor NEW
65.0 5.0 38.0 1.36 MB

Laravel Headless eCommerce 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.

Home Page: https://bagisto.com/en/headless-ecommerce/

License: MIT License

PHP 93.83% Blade 6.17%
jwt bagisto cart laravel graphql php opensource ecommerce headless headless-commerce graphql-api

headless-ecommerce's Introduction

Bagisto GraphQL API

Latest Stable Version Total Downloads License

Laravel eCommerce headless APIs allow you to experience seamless and easily scalable storefront performance. The open-source headless laravel platform built on GraphQL based Rest API delivers 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: v2.0.0

2. Installation:

To clone Bagisto GraphQL run the below command from terminal:

composer require bagisto/graphql-api dev-main
  • Add the below-line inside the modules index in config/concord.php file:
\Webkul\GraphQLAPI\Providers\ModuleServiceProvider::class,
  • Find a file app/Http/Kernel.php from root and add these two middlewares inside the $middleware array:
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
  • Find a file config/auth.php from root and bellow code inside guard:
    'api' => [
            'driver'   => 'jwt',
            'provider' => 'customer',
        ],

   'admin-api' => [
            'driver'   => 'jwt',
            'provider' => 'admin',
        ],

  • Find a file config/auth.php from root and bellow code inside providers:
    'customer' => [
            'driver' => 'eloquent',
            'model'  => Webkul\GraphQLAPI\Models\Customer\Customer::class,
        ],

    'admin' => [
            'driver' => 'eloquent',
            'model'  =>  Webkul\GraphQLAPI\Models\Admin\Admin::class,
        ],

  • Add the JWT_TTL (JWT time to live) & JWT_SHOW_BLACKLIST_EXCEPTION entries in the .env file:
JWT_TTL=525600
JWT_SHOW_BLACKLIST_EXCEPTION=true

To install and publish the assests and configurations, run below command from the root in terminal:

php artisan bagisto-graphql:install
  • Now to use the graphql-playground for testing the APIs:
http://your-domain.com/graphiql
  • You can also use the Postman for testing the APIs:
http://your-domain.com/graphql

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

headless-ecommerce's People

Contributors

anmol-chauhan avatar ashishkumar-webkul avatar deepaksinghgusain227 avatar devansh-webkul avatar funder7 avatar jitendra-webkul avatar naresh-webkul avatar rachana-webkul avatar ticket-master avatar vipinyadavakeneo avatar vivek-webkul avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

headless-ecommerce's Issues

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.

Product update mutation not working properly

I am trying create a product on bagisto with graphql product create mutation but have not found the way to pass name so product created without name on bagisto, And Update mutation also not working
so product name and description not getting update and inventory and price of the product update work fine.
Facing this issue for simple and configurable product

Error after updating Bagisto to 1.3.3 (from Product::getTypeInstance())

Hi,

After updating my project by merging Bagisto v1.3.3, the project became broken due to this error:

> @php artisan package:discover

PHP Fatal error:  Declaration of Webkul\GraphQLAPI\Models\Catalog\Product::getTypeInstance() must be compatible with Webkul\Product\Models\Product::getTypeInstance(): Webkul\Product\Type\AbstractType in /var/www/html/packages/Webkul/GraphQLAPI/Models/Catalog/Product.php on line 21

I'm sending a PR in the next minutes to fix the issue.

Cheers!

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.

Bagisto GraphQL Shop API: Get Customer Orders ERROR: "Cannot query field \"id\" on type \"OrderPaginator\"."

Hello! I've followed your documentations ( https://devdocs.bagisto.com/1.x/graphql-shop-api/orders.html#get-customer-orders ) to queries but I got this error in my localhost. Btw, the documentation is partially outdated. Any help will be much appreciated. Thanks.

For example, the simplest graphql query for orders: (the problem so far is only in orders, in other requests everything is okay)
query ordersList { ordersList(input: { orderDate: "2022-06-12" }) { id } }

And I got:
{ "errors": [ { "message": "Cannot query field \"id\" on type \"OrderPaginator\".", "extensions": { "category": "graphql" }, "locations": [ { "line": 3, "column": 5 } ] } ] }

PS: Now I checked other requests in the Bagisto GraphQL Shop API, they also do not work, requests only work in the Bagisto GraphQL Admin API

PS2: It looks like I understood what the problem is, we need the old version of the bagisto, namely v1.3. Version 1.4 not supported...

Screenshot from 2022-06-24 09-47-52

No commands defined in the "bagisto_graphql" namespace.

C:\xampp7\htdocs\bagisto>composer dump-autoload
Generating optimized autoload files

Illuminate\Foundation\ComposerScripts::postAutoloadDump
@php artisan package:discover
Discovered Package: astrotomic/laravel-translatable
Discovered Package: babenkoivan/elastic-client
Discovered Package: babenkoivan/elastic-scout-driver
Discovered Package: bagisto/bagisto-package-generator
Discovered Package: bagistobrasil/bagisto-product-social-share
Discovered Package: barryvdh/laravel-debugbar
Discovered Package: barryvdh/laravel-dompdf
Discovered Package: fideloper/proxy
Discovered Package: flynsarmy/db-blade-compiler
Discovered Package: intervention/image
Discovered Package: kalnoy/nestedset
Discovered Package: konekt/concord
Discovered Package: konekt/enum-eloquent
Discovered Package: laravel/scout
Discovered Package: laravel/socialite
Discovered Package: laravel/tinker
Discovered Package: laravel/ui
Discovered Package: maatwebsite/excel
Discovered Package: nesbot/carbon
Discovered Package: nunomaduro/collision
Discovered Package: prettus/l5-repository
Discovered Package: tymon/jwt-auth
Package manifest generated successfully.
Generated optimized autoload files containing 8817 classes

C:\xampp7\htdocs\bagisto>php artisan bagisto_graphql:install

There are no commands defined in the "bagisto_graphql" namespace.

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?

Settings API - Sliders Section - There should be API for Creating,Updating and Remove the Sliders.

Issue Description

There should be an option where we can create, update and Remove the sliders via API. There in the API we have options to check Sliders, but we do not have the options to create and update the Sliders.

Bagisto Version

V1.4.3

Steps To Reproduce

  1. Go to Postman -> Settings API Collection -> Sliders Section
  2. There we can see only two API's
  3. In Admin Panel we can see that the sliders create option is there.

Actual Result

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

POSTMAN COLLECTION
Screenshot from 2022-08-22 11-37-13

ADMIN PAGE
Screenshot from 2022-08-22 11-37-16

Expected Result

There should be API for the same create, update and remove the sliders.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.