website/public/API/queries/queries.php

20 lines
478 B
PHP
Raw Normal View History

2022-03-08 09:54:38 +01:00
<?php
use GraphQL\Type\Definition\ObjectType;
use GraphQL\Type\Definition\Type;
2022-03-08 10:04:11 +01:00
require "./queries/skills.php";
2022-03-08 09:54:38 +01:00
$queryType = new ObjectType([
'name' => 'Query',
'fields' => [
'sitekey' => [
'type' => Type::string(),
'resolve' => fn ($rootValue, $args) => $sitekey,
],
2022-03-08 10:04:11 +01:00
'skills' => [
'type' => Type::listOf(Type::string()),
'resolve' => fn ($rootValue, $args) => getSkills(),
],
2022-03-08 09:54:38 +01:00
],
]);