-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #973 from creative-commoners/pulls/4/webonyx
MNT Compatibility with webonyx/graphql-php v14
- Loading branch information
Showing
4 changed files
with
26 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,32 @@ | ||
<?php | ||
|
||
|
||
namespace DNADesign\Elemental\Tests\GraphQL; | ||
|
||
use GraphQL\Type\Definition\FieldDefinition; | ||
use GraphQL\Type\Definition\ResolveInfo; | ||
use GraphQL\Type\Definition\ObjectType; | ||
use GraphQL\Type\Definition\Type; | ||
use GraphQL\Type\Schema; | ||
|
||
class FakeResolveInfo extends ResolveInfo | ||
{ | ||
public function __construct() | ||
{ | ||
// webonyx/graphql-php v0.12 | ||
if (!property_exists(__CLASS__, 'fieldDefinition')) { | ||
return; | ||
} | ||
// webonyx/graphql-php v14 | ||
parent::__construct( | ||
FieldDefinition::create(['name' => 'fake', 'type' => Type::string()]), | ||
[], | ||
new ObjectType(['name' => 'fake']), | ||
[], | ||
new Schema([]), | ||
[], | ||
'', | ||
null, | ||
[] | ||
); | ||
} | ||
} |
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