Skip to content

Instantly share code, notes, and snippets.

@savinmikhail
savinmikhail / PropertyDefaultValueFieldsBuilder.php
Last active December 5, 2024 12:33
Fix api platform graphql issue, when properties with default values are parsed to schema as required ones
<?php
declare(strict_types=1);
namespace App\Main\ApiPlatform\GraphQl\Type;
use ApiPlatform\GraphQl\Type\FieldsBuilderEnumInterface;
use ApiPlatform\Metadata\GraphQl\Operation;
use BackedEnum;
use ReflectionClass;