Skip to content

Commit 261c80b

Browse files
authored
Allow to get field name from field context. (#929)
1 parent bb67a19 commit 261c80b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/GraphQL/Execution/FieldContext.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ public function __construct(ResolveContext $context, ResolveInfo $info) {
3131
$this->info = $info;
3232
}
3333

34+
/**
35+
* @return string
36+
*/
37+
public function getFieldName() {
38+
return $this->info->fieldName;
39+
}
40+
3441
/**
3542
* @return string
3643
*/

0 commit comments

Comments
 (0)