PHPackages                             edstevo/laravel-shopify-graph - 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. edstevo/laravel-shopify-graph

ActiveLibrary[API Development](/categories/api)

edstevo/laravel-shopify-graph
=============================

A package for connecting to the Shopify Graph API

v1.0.44(2mo ago)0247[1 PRs](https://github.com/edstevo/laravel-shopify-graph/pulls)MITPHPPHP ^8.3CI passing

Since Jan 21Pushed 2mo agoCompare

[ Source](https://github.com/edstevo/laravel-shopify-graph)[ Packagist](https://packagist.org/packages/edstevo/laravel-shopify-graph)[ Docs](https://github.com/edstevo/laravel-shopify-graph)[ GitHub Sponsors](https://github.com/EdStevo)[ RSS](/packages/edstevo-laravel-shopify-graph/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (18)Versions (48)Used By (0)

Laravel Shopify Graph API Integration
=====================================

[](#laravel-shopify-graph-api-integration)

Laravel package for posting Shopify Admin GraphQL queries/mutations with typed input DTOs.

Installation
------------

[](#installation)

```
composer require edstevo/laravel-shopify-graph
```

Publish config:

```
php artisan vendor:publish --tag=shopify-graph-config
```

Published config:

```
return [
    'enabled' => env('SHOPIFY_ENABLED', true),
];
```

API Versioning
--------------

[](#api-versioning)

The Shopify API version is intentionally hardcoded in the package (`2026-01`).
When upgrading Shopify API versions, this package should release a new major version.

Usage
-----

[](#usage)

### Facade

[](#facade)

```
use EdStevo\LaravelShopifyGraph\Facades\LaravelShopifyGraph;

$response = LaravelShopifyGraph::post(
    'your-shop.myshopify.com',
    'access_token',
    'query { shop { name } }',
    [] // optional variables
);
```

### Connection Class

[](#connection-class)

```
$response = app(\EdStevo\LaravelShopifyGraph\LaravelShopifyGraphConnection::class)->post(
    'your-shop.myshopify.com',
    'access_token',
    'query { shop { name } }',
    [] // optional variables
);
```

### Request Class

[](#request-class)

```
use EdStevo\LaravelShopifyGraph\LaravelShopifyGraphRequest;

class CreateBlogArticleRequest extends LaravelShopifyGraphRequest
{
    public function __construct(public BlogArticle $article) {}

    public function query(): string
    {
        return '
            mutation CreateArticle($article: ArticleCreateInput!) {
              articleCreate(article: $article) {
                article {
                  id
                }
                userErrors {
                  code
                  field
                  message
                }
              }
            }
        ';
    }

    public function variables(): array
    {
        return [
            'article' => ArticleCreateInput::from($this->article->toShopifyPayload())->toArray(),
        ];
    }

    public function transformResponse(array $data): mixed
    {
        return $data['articleCreate']['article']['id'] ?? null;
    }
}

$request = new CreateBlogArticleRequest(BlogArticle::first());
$shopifyId = $request->post('your-shop.myshopify.com', 'access_token');
```

### Queue Job Class (recommended for mutations)

[](#queue-job-class-recommended-for-mutations)

```
use EdStevo\LaravelShopifyGraph\LaravelShopifyGraphJob;
use Illuminate\Contracts\Queue\ShouldQueue;

class CreateBlogArticleJob extends LaravelShopifyGraphJob implements ShouldQueue
{
    public function __construct(
        public BlogArticle $article,
        public string $shopDomain,
        public string $accessToken
    ) {}

    public function getShopDomain(): string
    {
        return $this->shopDomain;
    }

    public function getAccessToken(): string
    {
        return $this->accessToken;
    }

    public function query(): string
    {
        return '
            mutation CreateArticle($article: ArticleCreateInput!) {
              articleCreate(article: $article) {
                article {
                  id
                }
                userErrors {
                  code
                  field
                  message
                }
              }
            }
        ';
    }

    public function variables(): array
    {
        return [
            'article' => ArticleCreateInput::from($this->article->toShopifyPayload())->toArray(),
        ];
    }

    public function handleResponse(array $data): void
    {
        $this->article->update([
            'shopify_id' => $data['articleCreate']['article']['id'] ?? null,
        ]);
    }
}

CreateBlogArticleJob::dispatch(BlogArticle::first(), 'your-shop.myshopify.com', 'access_token');
```

For synchronous execution:

```
CreateBlogArticleJob::dispatchSync(BlogArticle::first(), 'your-shop.myshopify.com', 'access_token');
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

See [CHANGELOG](CHANGELOG.md).

Credits
-------

[](#credits)

- [Edward Stephenson](https://github.com/edstevo)
- [All Contributors](../../contributors)

License
-------

[](#license)

MIT.

###  Health Score

48

—

FairBetter than 93% of packages

Maintenance87

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 53.1% of commits — single point of failure

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 ~2 days

Recently: every ~19 days

Total

45

Last Release

66d ago

PHP version history (2 changes)v1.0.0PHP ^8.4

v1.0.44PHP ^8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9676607?v=4)[Ed Stephenson](/maintainers/edstevo)[@edstevo](https://github.com/edstevo)

---

Top Contributors

[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (378 commits)")[![edstevo](https://avatars.githubusercontent.com/u/9676607?v=4)](https://github.com/edstevo "edstevo (85 commits)")[![mvdnbrk](https://avatars.githubusercontent.com/u/802681?v=4)](https://github.com/mvdnbrk "mvdnbrk (46 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (30 commits)")[![Nielsvanpach](https://avatars.githubusercontent.com/u/10651054?v=4)](https://github.com/Nielsvanpach "Nielsvanpach (23 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (20 commits)")[![pforret](https://avatars.githubusercontent.com/u/474312?v=4)](https://github.com/pforret "pforret (16 commits)")[![sebastiandedeyne](https://avatars.githubusercontent.com/u/1561079?v=4)](https://github.com/sebastiandedeyne "sebastiandedeyne (14 commits)")[![AlexVanderbist](https://avatars.githubusercontent.com/u/6287961?v=4)](https://github.com/AlexVanderbist "AlexVanderbist (12 commits)")[![riasvdv](https://avatars.githubusercontent.com/u/3626559?v=4)](https://github.com/riasvdv "riasvdv (10 commits)")[![patinthehat](https://avatars.githubusercontent.com/u/5508707?v=4)](https://github.com/patinthehat "patinthehat (10 commits)")[![crynobone](https://avatars.githubusercontent.com/u/172966?v=4)](https://github.com/crynobone "crynobone (8 commits)")[![AdrianMrn](https://avatars.githubusercontent.com/u/12762044?v=4)](https://github.com/AdrianMrn "AdrianMrn (8 commits)")[![irfanm96](https://avatars.githubusercontent.com/u/42065936?v=4)](https://github.com/irfanm96 "irfanm96 (5 commits)")[![thecaliskan](https://avatars.githubusercontent.com/u/13554944?v=4)](https://github.com/thecaliskan "thecaliskan (5 commits)")[![IGedeon](https://avatars.githubusercontent.com/u/694313?v=4)](https://github.com/IGedeon "IGedeon (4 commits)")[![abenerd](https://avatars.githubusercontent.com/u/7523903?v=4)](https://github.com/abenerd "abenerd (3 commits)")[![jessarcher](https://avatars.githubusercontent.com/u/4977161?v=4)](https://github.com/jessarcher "jessarcher (3 commits)")[![koossaayy](https://avatars.githubusercontent.com/u/6431084?v=4)](https://github.com/koossaayy "koossaayy (3 commits)")[![lloricode](https://avatars.githubusercontent.com/u/8251344?v=4)](https://github.com/lloricode "lloricode (3 commits)")

---

Tags

laraveledstevolaravel-shopify-graph

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/edstevo-laravel-shopify-graph/health.svg)

```
[![Health](https://phpackages.com/badges/edstevo-laravel-shopify-graph/health.svg)](https://phpackages.com/packages/edstevo-laravel-shopify-graph)
```

###  Alternatives

[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.1k11.2M100](/packages/dedoc-scramble)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

816333.3k3](/packages/defstudio-telegraph)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5021.9k](/packages/simplestats-io-laravel-client)[danestves/laravel-polar

A package to easily integrate your Laravel application with Polar.sh

8120.4k](/packages/danestves-laravel-polar)

PHPackages © 2026

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