Volver al ranking

wp-graphql/wp-graphql

PHPwpgraphql.com

:rocket: GraphQL API for WordPress

graphqlwordpresswp-plugingraphql-serverwordpress-pluginapiwpgraphqlgraphql-apigraphql-php-libraryhacktoberfestgatsby
Crecimiento de estrellas
Estrellas
3.8k
Forks
474
Crecimiento semanal
Issues
75
1k2k3k
feb 2017mar 2020may 2023jul 2026
ArtefactosPackagistcomposer require wp-graphql/wp-graphql
README
WPGraphQL Logo

WPGraphQL Monorepo

Total Downloads Monthly Downloads Daily Downloads Latest Stable Version Integration Tests Lint Schema Linter JS E2E Tests CodeQL codecov OpenSSF Best Practices

Unlock the power of WordPress data with GraphQL

WPGraphQL provides an extendable GraphQL API for any WordPress site, unlocking modern development workflows.

Whether you're a WordPress developer exploring GraphQL or a GraphQL expert diving into WordPress, WPGraphQL simplifies data interaction and empowers your development workflow.


📁 Repository Structure

This is a monorepo containing the WPGraphQL ecosystem of plugins and websites:

wp-graphql/
├── plugins/
│   ├── wp-graphql/          # WPGraphQL core plugin
│   ├── wp-graphql-ide/      # IDE extension plugin
│   ├── wp-graphql-smart-cache/ # Smart Cache extension plugin
│   └── wp-graphql-acf/      # ACF extension plugin
├── websites/
│   └── wpgraphql.com/        # WPGraphQL.com Next.js website
├── design/
│   └── brand/                # Product-family brand guides + wp.org asset generators
├── .wp-env.json             # Shared WordPress environment config
├── package.json             # Root workspace configuration
└── turbo.json               # Turborepo build orchestration

For end users: Nothing changes! Install WPGraphQL from WordPress.org, Composer, or download the release zip.

For contributors: Clone the repo and run:

npm install           # Install dependencies (uses workspaces)
npm run wp-env start  # Start WordPress environment with all plugins

📚 See the Development Guide for detailed setup instructions.


🎯 Vision

WPGraphQL aims to be the canonical GraphQL API for WordPress, providing:

  • A complete, flexible GraphQL schema for accessing WordPress data
  • Standards-based implementation following GraphQL and WordPress best practices
  • An extensible foundation for plugins to build upon
  • Production-ready performance suitable for high-traffic sites
  • Long-term stability with semantic versioning and backward compatibility

What Belongs in WPGraphQL Core?

In scope:

  • GraphQL schema for WordPress core features (posts, pages, users, taxonomies, etc.)
  • Performance optimizations that benefit all users
  • Developer APIs for extending the schema
  • Standards and patterns for the WPGraphQL ecosystem

Candidates for core (via Experiments):

  • Proposed features that need real-world validation before committing
  • Breaking changes that require community feedback
  • Performance improvements that need testing at scale
  • Learn more about Experiments →

Better as extensions:

  • Plugin-specific integrations (ACF, Yoast, WooCommerce, etc.)
  • Opinionated workflows or conventions
  • Features specific to particular frameworks or use cases

The difference: Experiments are potential core features being validated. Extensions are intentionally separate functionality that should remain as plugins. Experiments may graduate to core or be removed; extensions live independently forever.

This focus keeps WPGraphQL maintainable while enabling a rich ecosystem of extensions.


🚀 Get Started

  1. 📦 Install WPGraphQL: wp plugin install wp-graphql --activate
  2. 👩‍💻 Try it out: Live Demo
  3. 📖 Read the Quick Start Guide.
  4. 💬 Join the Community on Discord
  5. Star the Repo on GitHub 😉

🌟 Key Features

  • Flexible API: Access posts, pages, custom post types, taxonomies, users, and more.
  • Extendable Schema: Easily add functionality with functions like register_graphql_field and register_graphql_connection.
  • Modern Framework Integration: Works seamlessly with Next.js, Svelte, Astro and other frameworks.
  • Optimized Performance: Query only the data you need. Collect multiple resources in one request, reducing round-trips. Use WPGraphQL Smart Cache for enhanced performance and network-level caching and cache-invalidation.
  • Developer Tools: Explore the schema with tools like the GraphiQL IDE and WordPress Playground.

graphiql-ide-example.gif


📖 Documentation

For Users:

For Contributors:


🤝 Community Support

WPGraphQL is powered by a passionate community of contributors, backers, and sponsors.

Backers on Open Collective Sponsors on Open Collective

Want to help maintain and grow WPGraphQL?


🙌 Shout Outs

We extend our gratitude to the following projects and organizations for their contributions to the WordPress and GraphQL ecosystems:

  • Webonyx: For the amazing graphql-php library that powers WPGraphQL's core functionality.
  • Ivome: For the graphql-relay-php library used in relay connections.
  • Automattic: For supporting WPGraphQL's ongoing development as a canonical WordPress plugin.
  • Gatsby: For their contributions to the WPGraphQL ecosystem and support for headless WordPress development.
  • WPEngine: For funding early development of WPGraphQL and supporting its growth.
  • Facebook: For open-sourcing the GraphQL spec, GraphiQL, and maintaining the JavaScript reference implementation.
  • Apollo: For pushing GraphQL forward and inspiring schema design best practices.
  • The WordPress REST API Contributors: For paving the way with the WP-API project, inspiring WPGraphQL's architecture.

Thank you to all these organizations and individuals for their efforts in shaping the tools we rely on today.


🔌 Canonical Plugin

WPGraphQL is becoming a Canonical Plugin on WordPress.org, ensuring long-term support and a growing community of users and contributors.


🛠 Privacy & Telemetry

WPGraphQL uses the Appsero SDK to collect telemetry data only after user consent, helping us improve the plugin responsibly.

When telemetry is enabled, each payload is sent to Appsero and mirrored in non-blocking requests to WPGraphQL-operated infrastructure at https://telemetry.wpgraphql.com (the same data as described in Appsero’s policy).

Repositorios relacionados
hoppscotch/hoppscotch

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

TypeScriptnpmMIT Licenseapiapi-client
hoppscotch.io
79.8k6k
strapi/strapi

🚀 Strapi is the leading open-source headless CMS. It’s 100% JavaScript/TypeScript, fully customizable, and developer-first.

TypeScriptnpmOtherstrapinodejs
strapi.io
72.7k9.8k
gatsbyjs/gatsby

React-based framework with performance, scalability, and security built in.

JavaScriptnpmMIT Licensegatsbystatic-site-generator
gatsbyjs.com
56k10.2k
twentyhq/twenty

The open alternative to Salesforce, designed for AI.

TypeScriptnpmOthercrmcustomer
twenty.com
53.4k8.1k
prettier/prettier

Prettier is an opinionated code formatter.

JavaScriptnpmMIT Licenseformatterprinter
prettier.io
52.1k4.9k
TanStack/query

🤖 Powerful asynchronous state management, server-state utilities and data fetching for the web. TS/JS, React Query, Solid Query, Svelte Query and Vue Query.

TypeScriptnpmMIT Licensereacthooks
tanstack.com/query
50k4k
payloadcms/payload

Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.

TypeScriptnpmMIT Licenseheadless-cmscms
payloadcms.com
43.7k4k
Kong/insomnia

The open-source, cross-platform API client for GraphQL, REST, WebSockets, SSE and gRPC. With Cloud, Local and Git storage.

TypeScriptnpmApache License 2.0electron-apprest-api
insomnia.rest
39.9k2.4k
directus/directus

The flexible backend for all your projects 🐰 Turn your DB into a headless CMS, admin panels, or apps with a custom UI, instant APIs, auth & more.

TypeScriptnpmOtherapicms
directus.com
36.7k4.9k
refinedev/refine

A React Framework for building internal tools, admin panels, dashboards & B2B apps with unmatched flexibility.

TypeScriptnpmMIT Licensereacttypescript
refine.dev
35.3k3.2k
hasura/graphql-engine

Blazing fast, instant realtime GraphQL APIs on all your data with fine grained access control, also trigger webhooks on database events.

TypeScriptnpmApache License 2.0graphqlgraphql-server
hasura.io
32k2.9k
slymnoyann/hey-1

Hey is a decentralized and permissionless social media app built with Lens Protocol 🌿

TypeScriptnpmGNU General Public License v3.0web3blockchain
hey.xyz
29.4k1.8k