#[GQL\Input]
class TestInput {
#[GQL\Field(type: "String")]
public string myField = "default_value"; // <-- This doesn't work anymore
}
Either the MetadataParser should check this when generating the type and add a defaultValue on the input field, or this field should be skip in the ArgumentsTransformer.
Adding an FieldInput annotation/attribute should also be considered (as currently, the #GQL\Field does not allow a default value).
The changes introduce in this PR https://github.com/overblog/GraphQLBundle/pull/1143, breaks the usage of default value in PHP for Input fields. @deeky666
Either the
MetadataParser
should check this when generating the type and add adefaultValue
on the input field, or this field should be skip in theArgumentsTransformer
. Adding anFieldInput
annotation/attribute should also be considered (as currently, the#GQL\Field
does not allow a default value).