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:
Install NPM dependencies.
npm installInstall the WPGraphQL plugin.
npx wp-env run cli wp plugin install wpgraphqlStart the project.
npx wp-env start
npm start