Version 4.1.2
Patch
-
Updated dev dependencies.
-
Updated Prettier related package scripts.
-
Configured Prettier option
semi
to the default,true
. -
Ensure GitHub Actions run on pull request.
-
Minor v0.1.0 changelog entry tweak.
-
For clarity, manually specify a
500
HTTP status code even though it’s the default when throwing errors viahttp-errors
. -
Changed the error that the
execute
Koa middleware throws when there are GraphQL execution errors:-
The error is no longer created using
http-errors
, which doesn’t easily accept a200
status
. This allowed the removal of thecreateHttpError
function workaround. -
Changed the error message (an internal change as this message is not exposed to the client by the
errorHandler
Koa middleware):- GraphQL errors. + GraphQL execution errors.
-
-
Updated the
errorHandler
Koa middleware, fixing #8:- It can now handle a non enumerable object error, e.g.
null
. - The
extensions
property of an error is now always exposed to the client in the payloaderrors
array, even if the error message is not exposed via anexpose
property. - Added new
ErrorKoaMiddleware
andErrorGraphQLResolver
JSDoc typedefs to better document the special properties errors may have for theerrorHandler
Koa middleware to use to determine how the error appears in the response payloaderrors
array and the response HTTP status code. - Documented that additional custom Koa middleware can be used to customize the response.
- It can now handle a non enumerable object error, e.g.
-
Renamed the
startServer
test helper tolisten
.