forked from folkloreinc/laravel-graphql
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Verify that a type name is specified before overriding class's type name
Fixes folkloreinc#365
- Loading branch information
sburba
committed
Aug 1, 2018
1 parent
171631a
commit 4d05023
Showing
3 changed files
with
48 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
use GraphQL\Type\Definition\Type; | ||
use Folklore\GraphQL\Support\Type as GraphQLType; | ||
|
||
class AnotherCustomExampleType extends GraphQLType | ||
{ | ||
|
||
protected $attributes = [ | ||
'name' => 'AnotherCustomExample', | ||
'description' => 'An example' | ||
]; | ||
|
||
public function fields() | ||
{ | ||
return [ | ||
'test' => [ | ||
'type' => Type::string(), | ||
'description' => 'A test field' | ||
] | ||
]; | ||
} | ||
} |