1
0
Fork 0
mirror of synced 2024-06-29 03:30:34 +12:00
appwrite/app/controllers/api/graphql.php

23 lines
563 B
PHP
Raw Normal View History

2020-01-04 10:16:26 +13:00
<?php
global $utopia;
/**
* TODO:
* 1. Map all objects, object-params, object-fields
* 2. Parse GraphQL request payload (use: https://github.com/webonyx/graphql-php)
* 3. Route request to relevant controllers (of REST API?) / resolvers and aggergate data
* 4. Handle errors if any
* 5. Returen JSON response
* 6. Write tests!
*/
$utopia->post('/v1/graphql')
->desc('GraphQL Endpoint')
->label('scope', 'public')
->action(
function () {
2020-01-04 20:44:03 +13:00
throw new Exception('GraphQL support is coming soon!', 502);
2020-01-04 10:16:26 +13:00
}
);