Closed ttrig closed 1 year ago
Can't we just catch (and ignore) MissingAttributeException
in fieldFromObject
?
Can't we just catch (and ignore)
MissingAttributeException
infieldFromObject
?
See https://github.com/glesys/butler-graphql/pull/52/commits/313782a8a1837a207687654ba753e466286260be.
Since models implement ArrayAccess
I catch the exception in fieldFromArray
as well.
https://laravel.com/docs/9.x/eloquent#configuring-eloquent-strictness
Since we're resolving fields in snake, camel and kebab case a
MissingAttributeException
is thrown when eloquent is configured with$modelsShouldPreventAccessingMissingAttributes
.