Created
May 20, 2018 09:05
-
-
Save onurkose/9f765286103831811b1b13c53a2493c5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\GraphQL\Types\InputObjects; | |
use GraphQL\Type\Definition\Type; | |
use Rebing\GraphQL\Support\Type as GraphQLType; | |
class LocaleInputObjectType extends GraphQLType | |
{ | |
protected $inputObject = true; | |
protected $attributes = [ | |
'name' => 'LocaleInputObjectType', | |
'description' => 'A type of project locales' | |
]; | |
public function fields() | |
{ | |
return [ | |
'id' => [ | |
'type' => Type::nonNull(Type::id()), | |
'description' => 'The id of the locale' | |
], | |
'identifier' => [ | |
'type' => Type::string(), | |
'description' => 'The identifier of the locale' | |
], | |
'description' => [ | |
'type' => Type::string(), | |
'description' => 'The description of the locale' | |
], | |
'__typename' => [ | |
'type' => Type::string(), | |
'description' => 'Apollo sends it, ignore' | |
], | |
]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment