Closed
Description
Q | A |
---|---|
Bug report? | yes |
Version/Branch | 1.1.0 |
The changes introduce in this PR #1143, breaks the usage of default value in PHP for Input fields. @deeky666
#[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).