File tree Expand file tree Collapse file tree 4 files changed +17
-23
lines changed Expand file tree Collapse file tree 4 files changed +17
-23
lines changed Original file line number Diff line number Diff line change @@ -21,25 +21,4 @@ public function getAttributes() {
21
21
public function getArguments () {
22
22
return [];
23
23
}
24
-
25
- /**
26
- * Convert current field into array
27
- *
28
- * @return array
29
- */
30
- public function toArray () {
31
- $ attributes = $ this ->getAttributes () + [
32
- 'type ' => $ this ->getRelatedType (),
33
- 'args ' => $ this ->getArguments ()
34
- ];
35
-
36
- // Assert we have a resolve method
37
- if (method_exists ($ this , 'resolve ' )) {
38
- $ attributes = $ attributes + [
39
- 'resolve ' => [$ this , 'resolve ' ]
40
- ];
41
- }
42
-
43
- return $ attributes ;
44
- }
45
24
}
Original file line number Diff line number Diff line change 1
1
<?php
2
2
namespace StudioNet \GraphQL \Support ;
3
3
4
+ /**
5
+ * Represents must-used methods for an existing field
6
+ */
4
7
interface FieldInterface {
5
8
/**
6
9
* Return represented type
Original file line number Diff line number Diff line change 1
1
<?php
2
2
namespace StudioNet \GraphQL \Support ;
3
3
4
- class Mutation extends Field {}
4
+ /**
5
+ * Mutation
6
+ *
7
+ * @see Field
8
+ * @abstract
9
+ */
10
+ abstract class Mutation extends Field {}
Original file line number Diff line number Diff line change 1
1
<?php
2
2
namespace StudioNet \GraphQL \Support ;
3
3
4
- class Query extends Field {}
4
+ /**
5
+ * Query
6
+ *
7
+ * @see Field
8
+ * @abstract
9
+ */
10
+ abstract class Query extends Field {}
You can’t perform that action at this time.
0 commit comments