Download the PHP package technway/graphql-starter without Composer
On this page you can find all versions of the php package technway/graphql-starter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download technway/graphql-starter
More information about technway/graphql-starter
Files in technway/graphql-starter
Package graphql-starter
Short Description A specialized headless WordPress theme designed to function purely as a GraphQL API endpoint
License GPL-2.0-or-later
Informations about the package 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.
- Features
- Core Capabilities
- Custom Post Types and Fields
- GraphQL Capabilities
- Installation
- Using Composer (Recommended)
- Manual Installation
- Rename Theme
- Theme Configuration
- Configuration Constants
- Example Usage
- Directory Structure
includes/
Directorycore/
Directorydocs/
Directorytesting-graphql/
Directory
- Usage
- License
- Support
- 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
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
- Easy-to-use
CustomPostType
andCustomField
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-fields.md
files for more information on registering custom post types and custom fields.
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
Using Composer (Recommended)
Manual Installation
-
Download/Clone the theme from the Technway repository.
- Upload the theme folder to your WordPress installation directory under
/wp-content/themes/
. - Activate the theme via the WordPress admin panel under Appearance > Themes.
- Install and activate the WPGraphQL plugin.
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:
Example:
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
Constant | Type | Default | Description |
---|---|---|---|
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 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 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 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 for details. |
GRAPHQL_STARTER_SOCIAL_SHARE_ENABLED |
boolean | false |
Controls whether social sharing URLs are available in post queries. See 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
When GRAPHQL_STARTER_POST_PAGES_COUNT_ENABLED
is true, you can query post pagination counts.
For detailed information about each feature. See the docs/
directory.
Directory Structure
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
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
The docs/
directory contains additional detailed documentation files about the theme, its architecture, and usage examples. Refer to docs/usage.md
for more information on registering custom post types and custom fields.
testing-graphql/
Directory
The testing-graphql/
directory contains a .http
file for testing GraphQL queries. Refer to testing-graphql.md
for more information on testing GraphQL queries.
Usage
- Read the
blog-posts.md
file for more information on get posts in different scenarios and getting or toggling likes. - Read the
custom-post-types.md
file for more information on registering custom post types. - Read the
custom-fields.md
file for more information on registering custom fields.
License
This theme is licensed under the GNU General Public License v2 or later (GPL-2.0). See the LICENSE file for details.
Support
For support and contributions, visit the Technway GitHub repository.
Credits
The GraphQL Starter Theme is built with ❤️ and maintained by Technway. Special thanks to the creators of WPGraphQL for their excellent plugin.
Contributions are welcome! Feel free to fork the repository and submit pull requests.