Skip to content

A proof of concept of blocks using GraphQL queries and fragments.

Notifications You must be signed in to change notification settings

DAreRodz/wp-blocks-with-graphql

Repository files navigation

WP Blocks with GraphQL

This repository explores a possible aproximation on how to use GraphQL within blocks. The intention of unify and simplify database access from both the server and the client (the editor, in this case).

It consists of three blocks:

  • One parent block that request a query.
  • Two children blocks that use fragments to extend the parent's query.

This experiment has the following dependencies:

Set up

Install NPM dependencies.

npm install

Install the WPGraphQL plugin.

npx wp-env run cli wp plugin install wpgraphql

Start the project.

npx wp-env start
npm start

About

A proof of concept of blocks using GraphQL queries and fragments.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published