glesys / butler-graphql

An opinionated GraphQL package for Laravel.
MIT License
34 stars 5 forks source link

fix: Improve error handling in fieldFromResolver #11

Closed emil-nasso closed 5 years ago

emil-nasso commented 5 years ago

Avoid catching all ReflectionExceptions. These could indicate that there is no resolver for the field but it could also be an unrelated error.

Change the implementation to check in the container and with class_exists if we can instansiate the resolver. This avoids silently swallowing unrelated exceptions.