Closed ttrig closed 2 years ago
Should we maybe add a test for something that is "fully wrapped"?
[String!]! => [$phpEnum]
Mostly to make sure that the recursion of getWrappedType
works as we expect.
Edit: We don't have support for "converting" lists of php-enums to [String!]!
. This would be considered a "bonus" in my eyes. Not needed for this PR.
tldr; Eloquent models casting enums was catched by the
fieldFromArray
(because ofArrayAccess
) and the enum instance was returned instead of its value resulting in a "Expected a value of type "MyEnum" but received: instance of App\Enums\MyEnum" error.