Skip to content
Advertisement

Tag: graphql

Lighthouse graphql custom resolver

Quite new to GraphQL and lighthouse library, don’t be too harsh. Since I can’t use any models because my data source is an API. I’m trying to create a custom resolver that will pass data to a service who will do everything necessary to retrieve data from the API. And it constantly returns me this error: “Field “address” of type

can I throw custom error in laravel-lighthouse

is the any way that throw an error by GraphQLErrorError with no additional data except message. the current return data is it contains unnecessary data but I want something like: Answer You can throw your own exceptions, that will allow you to do that. Check https://lighthouse-php.com/5/digging-deeper/error-handling.html#registering-error-handlers.

Advertisement