Many different programming languages support GraphQL and PHP is one of them.
To execute a GraphQL query, you must send a
POST request to the Wino
/graphql endpoint with your desired query as below:
To have access to the API url, please contact the Wino team by email at
If you are using PHP, you can create a
graphql_query utility within a
graphql-client.php to facilitate your calls to the GraphQL API as follows:
Once done, you can run the
graphql_query function with the desired parameters:
The response returned will be as follows:
It's as simple as that!
- GraphQL PHP clients exist, you can use for example https://github.com/softonic/graphql-client. It has worked great for us !
- Alternatively, you can use
curlwith PHP to make your calls as detailed on the following link: https://stackoverflow.com/questions/54942131/php-curl-with-calling-an-api-with-graphql.