Download the PHP package thefold/graphql-wp without Composer

On this page you can find all versions of the php package thefold/graphql-wp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package graphql-wp

graphql-wp

A GraphQL endpoint for WordPress that's easy to customize.

This is a WordPress Plugin that exposes a GraphQL endpoint at /graphql.

Uses this excellent graphql-php library.

Supports Relay Connections.

Install

composer require mohiohio/graphql-wp

If your aren't familiar with using composer with WordPress I'd recommend using a setup like bedrock. Otherwise you will at the least need to require autoload.php for this to work.

Using

The best way to explore / develop with this is by visiting /graphiql after installation. This will show you the endpoints and arguments that are available. Note this will only work if you are a logged in admin user.

https://github.com/tim-field/graphql-wp/raw/master/.readme.md/graphiql.png

wp_query

This is designed to follow WordPress' existing WP Query functions. So as a rule you can pass the same parameters as your can to WP Query*.

*_In reality there are a lot of params you can pass to WP_Query, and I've only implemented the ones that I've needed so far. But adding more is trivial as the arguments are just passed directly to the getposts function, so its just a matter of defining them in the schema.

Will give you

Post

And of course you can get an individual post

Custom Fields

Any meta fields are available like so

If you want to define your own resolver / type you can extend the field schema for a post type like so.

Custom Post Types

This is how you can add custom post types ( which have custom fields ) to a client specific plugin. graphql-wp/get_post_types is a good hook for this. Where $types is a hash of the schema we are working with, so just add new items into this and you are good to go.

In the wild

http://www.page1management.com/

https://www.wokexpress.co.nz/menu


All versions of graphql-wp with dependencies

PHP Build Version
Package Version
Requires php Version >=7
mohiohio/wordpress-lib Version 0.1.5
webonyx/graphql-php Version 0.13.8
ivome/graphql-relay-php Version 0.5.0
danielstjules/stringy Version 2.4.0
rbdwllr/reallysimplejwt Version 3.0.2
ramsey/uuid Version 4.0.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package thefold/graphql-wp contains the following files

Loading the files please wait ....