PHPackages                             technway/graphql-starter - 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. technway/graphql-starter

ActiveWordpress-theme[API Development](/categories/api)

technway/graphql-starter
========================

A specialized headless WordPress theme designed to function purely as a GraphQL API endpoint

1.4.0(1y ago)67GPL-2.0-or-laterPHPPHP &gt;=7.2CI passing

Since Jan 30Pushed 8mo agoCompare

[ Source](https://github.com/technway/graphql-starter)[ Packagist](https://packagist.org/packages/technway/graphql-starter)[ RSS](/packages/technway-graphql-starter/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (1)Versions (4)Used By (0)

[![GraphQL Starter Logo](https://camo.githubusercontent.com/693c2d083113d4e7d8b50fdaa22d61cb6231a1f112f96b651d46b24e0c6c2b67/68747470733a2f2f692e6962622e636f2f514d72737076702f6772617068716c2d737461727465722d6c6f676f2e706e67)](https://camo.githubusercontent.com/693c2d083113d4e7d8b50fdaa22d61cb6231a1f112f96b651d46b24e0c6c2b67/68747470733a2f2f692e6962622e636f2f514d72737076702f6772617068716c2d737461727465722d6c6f676f2e706e67)GraphQL Starter
===============

[](#graphql-starter)

The **GraphQL Starter Theme** is a specialized headless WordPress theme designed to function purely as a GraphQL API endpoint. It eliminates traditional frontend rendering and focuses solely on providing a clean and efficient GraphQL API interface.

[![WordPress](https://camo.githubusercontent.com/04e77923e55079b57dd9c38c7ba129a0751df09b92d8179c467555b95c5186b9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f576f726450726573732d362e372d626c75652e737667)](https://wordpress.org/)[![PHP](https://camo.githubusercontent.com/4033461488999b303513e6078cee62032edb55123abd24c33bdcec1adee02f3b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d372e322b2d707572706c652e737667)](https://php.net/)[![License](https://camo.githubusercontent.com/ac405d9558280126e4191a23404aec222f4a29077fe388ad9c5abb349b62de7e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d47504c2d2d322e302d677265656e2e737667)](https://www.gnu.org/licenses/gpl-2.0.html)

---

- [Features](#features)
    - [Core Capabilities](#core-capabilities)
    - [Custom Post Types and Fields](#custom-post-types-and-fields)
    - [GraphQL Capabilities](#graphql-capabilities)
- [Installation](#installation)
    - [Using Composer (Recommended)](#using-composer-recommended)
    - [Manual Installation](#manual-installation)
    - [Rename Theme](#rename-theme)
- [Theme Configuration](#theme-configuration)
    - [Configuration Constants](#configuration-constants)
    - [Example Usage](#example-usage)
- [Directory Structure](#directory-structure)
    - [`includes/` Directory](#includes-directory)
        - [`core/` Directory](#core-directory)
    - [`docs/` Directory](#docs-directory)
    - [`testing-graphql/` Directory](#testing-graphql-directory)
- [Usage](#usage)
- [License](#license)
- [Support](#support)
- [Credits](#credits)

**This lightweight and secure solution is ideal for:**

- Public content APIs
- Headless frontend applications
- Scenarios where content management is handled through the WordPress admin interface

The theme has no authentication system, anonymous access is allowed to specific GraphQL queries and mutations. The following mutations are available:

- Comment creation
- Post like toggling

Features
--------

[](#features)

### Core Capabilities

[](#core-capabilities)

- **Headless WordPress API:** Designed to serve as a GraphQL API for seamless integration with modern frontend frameworks like React, Vue, or Angular.

### Custom Post Types and Fields

[](#custom-post-types-and-fields)

- Easy-to-use `CustomPostType` and `CustomField` classes for registering and managing post types and custom fields.
- Automatically integrates custom post types and fields into the GraphQL schema.
- Flexible configuration options for easy customization

> Check the [`docs/custom-post-types.md`](docs/custom-post-types.md) and [`docs/custom-fields.md`](docs/custom-fields.md) files for more information on registering custom post types and custom fields.

### GraphQL Capabilities

[](#graphql-capabilities)

- **Read Operations Examples:**

    - Query post types
    - Retrieve posts and their data
    - Access custom fields
    - Social sharing URLs for Posts
- **Write Operations Examples:**

    - Create comments on posts
    - Toggle post likes
- No authentication required for public operations (Anonymous access).

---

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

[](#installation)

### Using Composer (Recommended)

[](#using-composer-recommended)

```
composer create-project technway/graphql-starter your-theme-name --no-dev
```

### Manual Installation

[](#manual-installation)

1. Download/Clone the theme from the [Technway repository](https://github.com/technway/graphql-starter). ```
    git clone https://github.com/technway/graphql-starter.git
    ```
2. Upload the theme folder to your WordPress installation directory under `/wp-content/themes/`.
3. Activate the theme via the WordPress admin panel under **Appearance &gt; Themes**.
4. Install and activate the [WPGraphQL plugin](https://wordpress.org/plugins/wp-graphql/).

### Rename Theme

[](#rename-theme)

Use the `rename-theme.php` script to rename the theme. The script updates all references across relevant files while preserving formatting.

**Run the script from the root of the theme directory:**

```
php ./scripts/rename-theme.php "Your New Theme Name"
```

Example:

```
php ./scripts/rename-theme.php "My Custom GraphQL Theme"
```

---

Theme Configuration
-------------------

[](#theme-configuration)

The `theme.config.php` file contains essential configuration constants that control various features of the theme. These constants determine which functionalities are enabled or disabled.

### Configuration Constants

[](#configuration-constants)

ConstantTypeDefaultDescription`GRAPHQL_STARTER_ENABLE_CUSTOM_POST_TYPES`boolean`false`Controls whether custom post types are enabled. When true, allows registration of custom post types. See [`docs/custom-post-types.md`](docs/custom-post-types.md) for details.`GRAPHQL_STARTER_ENABLE_CUSTOM_FIELDS`boolean`false`Controls whether custom fields are enabled. When true, allows registration of custom fields. See [`docs/custom-fields.md`](docs/custom-fields.md) for details.`GRAPHQL_STARTER_LIKE_POSTS_ENABLED`boolean`false`Enables/disables the post likes system. When true, activates like/unlike queries and mutations. See [`docs/blog-posts.md`](docs/blog-posts.md) for details.`GRAPHQL_STARTER_POST_PAGES_COUNT_ENABLED`boolean`true`Controls whether total pages count is available in GraphQL queries. When true, adds 'total' field to pageInfo in post queries. Useful for pagination UI. See [`docs/blog-posts.md`](docs/blog-posts.md) for details.`GRAPHQL_STARTER_SOCIAL_SHARE_ENABLED`boolean`false`Controls whether social sharing URLs are available in post queries. See [`docs/blog-posts.md`](docs/blog-posts.md) for details`GRAPHQL_STARTER_REDIRECT_FRONTEND_ENABLED`boolean`true`Controls whether the frontend is redirected to the admin dashboard. When true, the frontend is redirected to the admin dashboard.### Example Usage

[](#example-usage)

When `GRAPHQL_STARTER_POST_PAGES_COUNT_ENABLED` is true, you can query post pagination counts.

For detailed information about each feature. See the [`docs/`](./docs/) directory.

Directory Structure
-------------------

[](#directory-structure)

```
graphql-starter/                   # Root directory of the theme
├── includes/                      # Core functionalities of the theme
│   ├── core/                      # Essential reusable components and logic
│   │   ├── classes/               # PHP classes for managing CPTs and CFs
│   │   │   ├── CustomField.php          # Class for defining custom fields
│   │   │   ├── CustomFieldRenderer.php  # Class for rendering custom fields
│   │   │   ├── CustomPostType.php       # Class for defining custom post types
│   │   ├── bootstrap/             # Initialization files for CPTs and fields
│   │   │   ├── cf-bootstrap.php   # Initializes custom fields
│   │   │   ├── cpt-bootstrap.php  # Initializes custom post types
│   │   ├── graphql/               # Files specific to GraphQL setup
│   │   │   ├── graphql-setup.php  # Configures GraphQL endpoints and settings
│   │   ├── custom-fields.php          # Registers and manages custom fields
│   │   ├── post-types.php             # Registers and manages custom post types
├── scripts/                       # Utility scripts for automation
│   ├── rename-theme.php           # Script to rename theme references
├── testing-graphql/               # GraphQL query test files for debugging
│   ├── *.http                     # HTTP files for testing GraphQL queries and mutations
│   ├── testing-graphql.md         # Documentation for testing GraphQL
├── docs/                          # Documentation files for the theme
├── functions.php                  # Main WordPress functions file
├── index.php                      # Empty index file
├── theme.config.php               # Theme configuration

```

### `includes/` Directory

[](#includes-directory)

The `includes/` directory contains the core classes used to register custom post types (CPTs) and custom fields (CFs). These classes simplify the process of creating and managing CPTs and CFs within the theme. It also contains the `custom-fields.php` and `post-types.php` files, which are used to register custom fields and post types respectively.

#### `core/` Directory

[](#core-directory)

The `core/` directory contains the reusable classes used to register custom post types (CPTs) and custom fields (CFs). These classes simplify the process of creating and managing CPTs and CFs within the theme.

### `docs/` Directory

[](#docs-directory)

The `docs/` directory contains additional detailed documentation files about the theme, its architecture, and usage examples. Refer to [`docs/usage.md`](docs/usage.md) for more information on registering custom post types and custom fields.

### `testing-graphql/` Directory

[](#testing-graphql-directory)

The `testing-graphql/` directory contains a `.http` file for testing GraphQL queries. Refer to [`testing-graphql.md`](testing-graphql/testing-graphql.md) for more information on testing GraphQL queries.

---

Usage
-----

[](#usage)

- Read the [`blog-posts.md`](docs/blog-posts.md) file for more information on get posts in different scenarios and getting or toggling likes.
- Read the [`custom-post-types.md`](docs/custom-post-types.md) file for more information on registering custom post types.
- Read the [`custom-fields.md`](docs/custom-fields.md) file for more information on registering custom fields.

---

License
-------

[](#license)

This theme is licensed under the GNU General Public License v2 or later (GPL-2.0). See the [LICENSE](LICENSE) file for details.

---

Support
-------

[](#support)

For support and contributions, visit the [Technway GitHub repository](https://github.com/technway/graphql-starter).

---

Credits
-------

[](#credits)

The GraphQL Starter Theme is built with ❤️ and maintained by **[Technway](https://technway.biz)**. Special thanks to the creators of [WPGraphQL](https://www.wpgraphql.com/) for their excellent plugin.

Contributions are welcome! Feel free to fork the repository and submit pull requests.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance51

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 83.9% 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 ~1 days

Total

3

Last Release

468d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9d5f340055c0ce6299a333d3407604b2eb14a906eb60c422a3cf3b6532ffca1c?d=identicon)[technway](/maintainers/technway)

---

Top Contributors

[![khaledsAlshibani](https://avatars.githubusercontent.com/u/127689031?v=4)](https://github.com/khaledsAlshibani "khaledsAlshibani (47 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (6 commits)")[![alaasaifsm](https://avatars.githubusercontent.com/u/170652164?v=4)](https://github.com/alaasaifsm "alaasaifsm (3 commits)")

---

Tags

graphql-apiheadless-wordpressstarter-themewordpress-themewpgraphql

### Embed Badge

![Health badge](/badges/technway-graphql-starter/health.svg)

```
[![Health](https://phpackages.com/badges/technway-graphql-starter/health.svg)](https://phpackages.com/packages/technway-graphql-starter)
```

###  Alternatives

[sybrew/the-seo-framework

An automated, advanced, accessible, unbranded and extremely fast SEO solution for any WordPress website.

47078.8k](/packages/sybrew-the-seo-framework)[a2design-company/mandrill-cakephp-plugin

Mandrill CakePHP plugin

193.2k](/packages/a2design-company-mandrill-cakephp-plugin)

PHPackages © 2026

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