AppRouter setup with React, GraphQL, WordPress App

This is the second part of Create react app with GraphQL way of WordPress data

In this part, we will build src/AppRouter.js.


We will use { BrowserRouter, Route, Switch } from react-router-dom.
We will use ApolloClient and {gql} from apollo-boost package to connect React with Apollo. And import milligram CSS.
We will use the App component here. Also, import Post and NotFound components in src/AppRouter.js from respective files.

Continue reading “AppRouter setup with React, GraphQL, WordPress App”

Setup for React front-end with GraphQL to fetch WordPress back-end

This is the first part of Create react app with GraphQL way of WordPress data

Download WP-GraphQL from https://github.com/wp-graphql/wp-graphql and rename it wp-graphql. Install it in WordPress and active this plugin as usual. Then, visit

domain.name/?graphql
WP-Graphql success message
wp-graphql success message

If it shows a page of error, then confirmed wp-graphql plugin works.

Continue reading “Setup for React front-end with GraphQL to fetch WordPress back-end”