diff --git a/src/GraphQl/Type/FieldsBuilder.php b/src/GraphQl/Type/FieldsBuilder.php index 3842f00ae4d..ef8655c568e 100644 --- a/src/GraphQl/Type/FieldsBuilder.php +++ b/src/GraphQl/Type/FieldsBuilder.php @@ -224,7 +224,7 @@ public function getResourceObjectTypeFields(?string $resourceClass, ResourceMeta } if ($fieldConfiguration = $this->getResourceFieldConfiguration($property, $propertyMetadata->getDescription(), $propertyMetadata->getAttribute('deprecation_reason', ''), $propertyType, $resourceClass, $input, $queryName, $mutationName, $subscriptionName, $depth)) { - $fields['id' === $property ? '_id' : $this->normalizePropertyName($property)] = $fieldConfiguration; + $fields['id' === $property ? '_id' : $this->normalizePropertyName($property, $resourceClass)] = $fieldConfiguration; } } } @@ -493,8 +493,8 @@ private function convertType(Type $type, bool $input, ?string $queryName, ?strin : GraphQLType::nonNull($graphqlType); } - private function normalizePropertyName(string $property): string + private function normalizePropertyName(string $property, string $resourceClass): string { - return null !== $this->nameConverter ? $this->nameConverter->normalize($property) : $property; + return null !== $this->nameConverter ? $this->nameConverter->normalize($property, $resourceClass) : $property; } }