PHPackages                             dre1080/wp-graphql-upload - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. dre1080/wp-graphql-upload

ActiveWordpress-plugin[File &amp; Storage](/categories/file-storage)

dre1080/wp-graphql-upload
=========================

Adds file upload support to the WP GraphQL Plugin.

v0.1.5(2y ago)3865.0k—5.9%4[2 issues](https://github.com/dre1080/wp-graphql-upload/issues)GPL-3.0-or-laterPHPPHP &gt;=7.1

Since Feb 6Pushed 1y ago2 watchersCompare

[ Source](https://github.com/dre1080/wp-graphql-upload)[ Packagist](https://packagist.org/packages/dre1080/wp-graphql-upload)[ RSS](/packages/dre1080-wp-graphql-upload/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (1)Dependencies (6)Versions (7)Used By (0)

WPGraphQL Upload
================

[](#wpgraphql-upload)

This plugin adds Upload support to the [WPGraphQL plugin](https://github.com/wp-graphql/wp-graphql) as specified by [graphql-multipart-request-spec](https://github.com/jaydenseric/graphql-multipart-request-spec).

Requirements
------------

[](#requirements)

- PHP &gt;= 7.1
- WordPress &gt;= 5.0
- WPGraphQL &gt;= 1.0.0

Activating / Using
------------------

[](#activating--using)

You can install and activate the plugin like any WordPress plugin. Download the .zip from Github and add to your plugins directory, then activate.

Once the plugin is active, the `Upload` scalar type will be available to your mutation input fields.

If you're using composer:

```
composer require dre1080/wp-graphql-upload
```

Usage
-----

[](#usage)

Then you can start using in your mutations like so:

```
register_graphql_mutation(
  'upload', [
      'inputFields' => [
          'file' => [
              'type' => ['non_null' => 'Upload'],
          ],
      ],
      'outputFields' => [
          'text' => [
              'type'    => 'String',
              'resolve' => function ($payload) {
                  return $payload['text'];
              },
          ],
      ],
      'mutateAndGetPayload' => function ($input) {
          if (!function_exists('wp_handle_sideload')) {
              require_once(ABSPATH . 'wp-admin/includes/file.php');
          }

          wp_handle_sideload($input['file'], [
              'test_form' => false,
              'test_type' => false,
          ]);

          return [
              'text' => 'Uploaded file was "' . $input['file']['name'] . '" (' . $input['file']['type'] . ').',
          ];
      }
  ]
);
```

Testing
-------

[](#testing)

Requirements:

- [svn](https://subversion.apache.org/)
- [wp-cli](https://wp-cli.org/)

To run the tests, run the following commands:

```
bin/install-wp-tests.sh
vendor/bin/phpunit
```

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance25

Infrequent updates — may be unmaintained

Popularity42

Moderate usage in the ecosystem

Community13

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 56.3% 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 ~178 days

Recently: every ~222 days

Total

6

Last Release

1083d ago

PHP version history (2 changes)v0.1PHP ^7

v0.1.5PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/5a91a35529ca015d1bd2a8894120dc6391978c9fb56844925d0b98a04488e8f0?d=identicon)[dre1080](/maintainers/dre1080)

---

Top Contributors

[![dre1080](https://avatars.githubusercontent.com/u/303936?v=4)](https://github.com/dre1080 "dre1080 (18 commits)")[![justlevine](https://avatars.githubusercontent.com/u/29322304?v=4)](https://github.com/justlevine "justlevine (13 commits)")[![stefanmomm](https://avatars.githubusercontent.com/u/10480858?v=4)](https://github.com/stefanmomm "stefanmomm (1 commits)")

---

Tags

graphqlgraphql-uploaduploadwordpresswordpress-pluginwp-pluginwpgraphqlwpgraphql-pluginwordpressgraphqluploadwp-graphql

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/dre1080-wp-graphql-upload/health.svg)

```
[![Health](https://phpackages.com/badges/dre1080-wp-graphql-upload/health.svg)](https://phpackages.com/packages/dre1080-wp-graphql-upload)
```

###  Alternatives

[ecodev/graphql-upload

A middleware to support file uploads in GraphQL

902.3M16](/packages/ecodev-graphql-upload)[wp-graphql/wp-graphql-woocommerce

WooCommerce bindings for WPGraphQL

70556.6k](/packages/wp-graphql-wp-graphql-woocommerce)[mcguffin/acf-dropzone

Drag and drop file upload for ACF-Fields.

339.2k](/packages/mcguffin-acf-dropzone)[patroklo/octobercms-improved-fileupload

Improves October CMS file upload form widget options with user defined rules.

114.5k](/packages/patroklo-octobercms-improved-fileupload)

PHPackages © 2026

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