Download the PHP package adeey/graphql-php without Composer
On this page you can find all versions of the php package adeey/graphql-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package graphql-php
Build a Mutation/Query from php-array
This library can build a ready to use query/mutation string from php array
Installation
Classes
Steps to use
Steps to use:
- Create new class object with mutation/query name
-
Add what you want to select
2.1 Or you can pass a one name of field
- Add arguments(filters) to your query
- Get the builded query
- Use the string in your request
OR
You can build string by calling static method:
both of these methods will return string
Methods
Methods that can be called from object
- To return current selected fields
- To return current arguments
Where is arguments/select?
php code of example:
How to build a query like this? Its pretty easy
PHP code:
The result of PHP code is string of query that equals my GraphQL query and its generated from PHP arrays:
How to build a mutation like this?
PHP code:
Result mutation in string
Additional cases:
Sometimes we want to add extra filter to query like this:
We need to write like that:
All versions of graphql-php with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.5
The package adeey/graphql-php contains the following files
Loading the files please wait ....