Sign inSign up

abstractvector/contentry

By abstractvector

•Updated almost 9 years ago

Highly extensible GraphQL API for the WordPress blog platform

Image
0

746

abstractvector/contentry repository overview

⁠Contentry

Highly extensible GraphQL read APIs for the WordPress blog platform.

By reading directly from the MySQL database, this library allows you to make the WordPress webserver externally inaccessible and expose the content to your UI via GraphQL. This integration model makes it the perfect partner for a Progressive Web App built using a technology such as ReactJS.

⁠Getting Started

Just use docker run to get started.

⁠Environmental Variables

The following environmental variables are available to configure access to the database:

Environment VariableDefault ValueNotes
MYSQL_HOSTNAMElocalhostMySQL database hostname
MYSQL_USERNAMErootMySQL user with read permissions to the WordPress database
MYSQL_PASSWORD[empty]Password for the MySQL user
MYSQL_DATABASEwordpressWordPress database name
MYSQL_TABLE_PREFIXwp_Prefix for the table names within the WordPress database

⁠GraphQL Server

The application is a wrapper around a set of GraphQL schemas and types, along with resolvers which retrieve data directly from the WordPress database.

If you are using the server directly then by default it exposes an HTTP server on port 3000. This can be changed with the options key server.port passed into the application constructor and defined in the config file.

The data are then made available as a GraphQL API at:

http://localhost:3000/graphql

There is also a GraphiQL UI for navigating the GraphQL API available at:

http://localhost:3000/graphiql

⁠API

The API is intended to be discoverable, and can be easily browsed using the GraphiQL endpoint.

Tag summary

Content type

Image

Digest

Size

37.8 MB

Last updated

almost 9 years ago

docker pull abstractvector/contentry