Download the PHP package wappcode/graphql-basic-client without Composer
On this page you can find all versions of the php package wappcode/graphql-basic-client. 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-basic-client
GraphQL Basic Client
Allows making queries to a graphql API.
Gets an array as result
Requirements
Needs curl extension enabled
Install
composer require wappcode/graphql-basic-client
Use
Query
$client = new GQLClient("http://graphql-api");
$query = '
query {
users {
id
name
firstname
lastname
email
}
}
';
$result = $client->execute($query);
Mutation
$client = new GQLClient("http://graphql-api");
$query = '
mutation MutationCreateUser($input: UserInput) {
user: createUser(input: $input) {
id
name
firstname
lastname
email
}
}
';
$variables = [
"input" => [
"firstname" => "John",
"lastname" => "Doe",
"email" => "[email protected]"
]
];
$headers = [
"Authorization: Bearer jwt"
];
$result = $client->execute($query, $variables, $headers);
All versions of graphql-basic-client with dependencies
PHP Build Version
Package Version
No informations.
The package wappcode/graphql-basic-client contains the following files
Loading the files please wait ....