/

About WPGraphQL

Learn about the WPGraphQL Plugin


About GraphQL

GraphQL is a spec for a Query Language for application data graphs. GraphQL isn’t tied to any specific database or storage engine and is instead backed by your existing code and data. As GraphQL is a spec, there are implementations in nearly every language, and for many different systems.

GraphQL is centered around a strongly typed Schema. The GraphQL Schema is composed of Types, and Types are composed of fields. Fields are defined with Type that they should resolve to. Field’s can be defined as a Scalar Type (string, integer, boolean, float), or another Type.

These concepts might be hard to grasp right now, but as you continue exploring the docs, they should start to make more sense.

What is GraphQL?

GraphQL is a specification for a Query Language for interacting with data from any data source.

  • Graph: stands for "application data graph"
  • QL: stands for "Query Language"

So GraphQL is: A Query Language for interacting with an Application Data Graph.

In the case of WPGraphQL, the "application data graph" that we're interacting with is data that lives in and makes up WordPress, such as: posts, pages, taxonomy terms, comments, users, meta, settings and more.

WPGraphQL provides support for GraphQL Queries and GraphQL Mutations, where queries are meant for asking for data, and Mutations are meant for changing (writing) data back to the WordPress database.

What is an "Application Data Graph"?

There's a fantastic talk and article by Dhaivat Pandya where he walks through what an application data graph is visually.

Jason Bahl gave a talk at GraphQL Summit 2017 where he shows what WordPress looks like as an Application Data Graph. (view the slides)

How WPGraphQL Brings GraphQL to WordPress

WPGraphQL is built atop the GraphQL-PHP library and provides an executable, extendable Schema and resolvers for your WordPress site.

WPGraphQL takes advantages of the various static registries in WordPress, such as the Post Type, Taxonomy and Settings registries to build a Schema for your WordPress site.

Edit on GitHub

About WPGraphQL

Edit on GitHub

Discuss on Spectrum