bagisto / graphql-api
Bagisto GraphQL API
Installs: 9 071
Dependents: 0
Suggesters: 0
Security: 0
Stars: 78
Watchers: 5
Forks: 46
Open Issues: 3
Requires
- mll-lab/laravel-graphiql: ^3.1
- nuwave/lighthouse: ^6.23
- php-open-source-saver/jwt-auth: ^2.1
README
Bagisto's GraphQL API enables a seamless, headless eCommerce experience built on Laravel. This API delivers ultra-fast, dynamic, and personalized shopping experiences through a scalable, open-source platform.
Read our full documentation: Bagisto GraphQL API Docs
This API was developed in collaboration with the Ucraft Team.
Requirements:
- Bagisto: v2.2.2 or higher
Installation:
To install the Bagisto GraphQL API, follow these steps:
-
Install via Composer
Run the following command in your terminal to install the GraphQL API package:
composer require bagisto/graphql-api dev-main
-
Update Middleware Configuration
In the
app/Http/Kernel.php
file, move the following middleware from theweb
section in themiddlewareGroups
array to the globalmiddleware
array:\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, \Illuminate\Session\Middleware\StartSession::class,
-
Update Environment Settings
Add the following entries to your
.env
file to configure JWT settings:JWT_TTL=525600 JWT_SHOW_BLACKLIST_EXCEPTION=true
-
Publish Assets and Configurations
Run the command below to publish assets and configurations for Bagisto GraphQL:
php artisan bagisto-graphql:install
Usage:
-
GraphQL Playground
After installation, you can test your API through the GraphQL Playground. Visit:
http://your-domain.com/graphiql
-
Postman Integration
Alternatively, you can test the API using Postman by accessing:
http://your-domain.com/graphql
That's it! Your Bagisto GraphQL API is now ready. Execute the project on your specified domain and start building your headless eCommerce solution.