Quick Start
WPGraphQL is a WordPress plugin that allows developers to interact with WordPress data using GraphQL.
This quick start guide is intended for developers that want to use GraphQL with WordPress. This guide will be most useful for developers already familiar with WordPress. If you’re brand new to WordPress, you should check out the Intro to WordPress guide.
Install
WPGraphQL is a WordPress plugin, so in order to use WPGraphQL with WordPress, it must first be installed and activated.
There are a few methods to install plugins to WordPress.
Install from your WordPress Dashboard
- Log in to your WordPress install
- From the Administration Panels, click on the Plugin Menu
- Under Plugins, click the “Add New” sub menu
- Search for “WPGraphQL”
- Click the “Install Now” button on the WPGraphQL plugin (should be the first one)
- After installation, you will find a new menu item “GraphQL” and in the top Admin Bar will be a “GraphiQL IDE” menu item.
Other Install Methods
If you prefer not to install WPGraphQL from the WordPress.org repository, you can also install from GitHub or Composer.
Install from Composer
Installing plugins with Composer, a PHP dependency manager, allows you to avoid committing plugin code into your project’s version control.
WPGraphQL is available for installing with Composer from packagist.org and wpackagist.org.
The most straight forward way to install WPGraphQL with composer would be to run the following command:
This would add WPGraphQL as a dependency for your project.
The fine folks of roots.io have written more information on Using Composer with WordPress.
Install from Github
- Visit WPGraphQL on Github at https://github.com/wp-graphql/wp-graphql
- Click the green “Code” button at the top right
- Click “Download Zip”
- Login to your WordPress install
- From the Administration Panels, click on the Plugin Menu
- Under Plugins, click the “Add New” sub menu
- At the top of the page click “Upload Plugin”
- Click “Choose File” and select the Zip of WPGraphQL that was downloaded from Github
- Click “Install Now”
- Click “Activate”
Use GraphiQL and Write your first GraphQL Query
Once WPGraphQL is installed and activated, it’s time to write your first GraphQL Query.
WPGraphQL includes a helpful tool called GraphiQL IDE, a tool that allows you to explore your GraphQL Schema end execute GraphQL Queries and Mutations.
Open GraphiQL
Open the GraphiQL IDE by clicking the “GraphiQL IDE” button in your WordPress Admin Bar.

This will take you to the GraphiQL IDE page.

Search the Schema
Click the “Docs” button at the top right of the GraphiQL IDE.
This will expand a “Documentation Explorer” that can be used to see what Types and Fields are available in the WPGraphQL Schema.
Let’s search the Schema for something WordPress is known for: “Posts”
In the “Search Schema” field, enter the word “posts”. You should see results similar to the below screen recording.
Write Your First WPGraphQL Query
In the left pane, select the grayed out text and delete it.
Then paste in the following:
Then click the “Play” button to execute the query.
Your Query will be sent to your site’s WPGraphQL API endpoint and will return results that match the data that you asked for.

Next Steps
Now that you have WPGraphQL installed and activated and have written your first query, consider some of the following guides to get more familiar with using GraphQL with WordPress: