Skip to content

Commit b0fca4a

Browse files
stefanospetrakisfubhy
authored andcommitted
Added interface inheritance test. (#395)
1 parent 59eafd6 commit b0fca4a

3 files changed

Lines changed: 20 additions & 2 deletions

File tree

tests/modules/graphql_plugin_test/src/Plugin/GraphQL/Fields/Engine.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* secure = true,
1414
* name = "engine",
1515
* type = "String",
16-
* types = {"Car"}
16+
* types = {"MotorizedVehicle"}
1717
* )
1818
*/
1919
class Engine extends FieldPluginBase {
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
namespace Drupal\graphql_plugin_test\Plugin\GraphQL\Interfaces;
4+
5+
use Drupal\graphql\Plugin\GraphQL\Interfaces\InterfacePluginBase;
6+
7+
/**
8+
* Vehicle interface definition.
9+
*
10+
* @GraphQLInterface(
11+
* id = "motorized_vehicle",
12+
* name = "MotorizedVehicle",
13+
* interfaces = {"Vehicle"}
14+
* )
15+
*/
16+
class MotorizedVehicle extends InterfacePluginBase {
17+
18+
}

tests/modules/graphql_plugin_test/src/Plugin/GraphQL/Types/Car.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* @GraphQLType(
1111
* id = "car",
1212
* name = "Car",
13-
* interfaces = {"Vehicle"},
13+
* interfaces = {"MotorizedVehicle"},
1414
* )
1515
*/
1616
class Car extends TypePluginBase {

0 commit comments

Comments
 (0)