Skip to content

Commit a7fc9d1

Browse files
committed
Fix type name lookup in registry as per recommendation in craftcms/cms/issues/7551
1 parent ae70826 commit a7fc9d1

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/integrations/graphql/MapType.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public static function getType (): Type
117117

118118
public static function getInputType (): InputType
119119
{
120-
$name = static::class . 'Input';
120+
$name = static::getName() . 'Input';
121121

122122
if ($type = GqlEntityRegistry::getEntity($name))
123123
return $type;
@@ -133,7 +133,7 @@ public static function getInputType (): InputType
133133

134134
public static function getQueryType (): InputType
135135
{
136-
$name = static::class . 'Query';
136+
$name = static::getName() . 'Query';
137137

138138
if ($type = GqlEntityRegistry::getEntity($name))
139139
return $type;
@@ -149,7 +149,7 @@ public static function getQueryType (): InputType
149149

150150
public static function getCoordsType (): InputType
151151
{
152-
$name = static::class . 'Coords';
152+
$name = static::getName() . 'Coords';
153153

154154
if ($type = GqlEntityRegistry::getEntity($name))
155155
return $type;
@@ -174,7 +174,7 @@ public static function getCoordsType (): InputType
174174

175175
public static function getUnitType (): EnumType
176176
{
177-
$name = static::class . 'Unit';
177+
$name = static::getName() . 'Unit';
178178

179179
if ($type = GqlEntityRegistry::getEntity($name))
180180
return $type;

0 commit comments

Comments
 (0)