Learn about the WPGraphQL Plugin
import Note from '../../src/components/Note'
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:
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"?
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.