Releases: jaydenseric/graphql-api-koa
Version 4.1.2
Patch
-
Updated dev dependencies.
-
Updated Prettier related package scripts.
-
Configured Prettier option
semito the default,true. -
Ensure GitHub Actions run on pull request.
-
Minor v0.1.0 changelog entry tweak.
-
For clarity, manually specify a
500HTTP status code even though it’s the default when throwing errors viahttp-errors. -
Changed the error that the
executeKoa middleware throws when there are GraphQL execution errors:-
The error is no longer created using
http-errors, which doesn’t easily accept a200status. This allowed the removal of thecreateHttpErrorfunction workaround. -
Changed the error message (an internal change as this message is not exposed to the client by the
errorHandlerKoa middleware):- GraphQL errors. + GraphQL execution errors.
-
-
Updated the
errorHandlerKoa middleware, fixing #8:- It can now handle a non enumerable object error, e.g.
null. - The
extensionsproperty of an error is now always exposed to the client in the payloaderrorsarray, even if the error message is not exposed via anexposeproperty. - Added new
ErrorKoaMiddlewareandErrorGraphQLResolverJSDoc typedefs to better document the special properties errors may have for theerrorHandlerKoa middleware to use to determine how the error appears in the response payloaderrorsarray 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
startServertest helper tolisten.
Version 4.1.1
Patch
- Updated dev dependencies.
- Use
isobjectfor checking if values are enumerable, non-array objects. - Destructure GraphQL execute results.
Version 4.1.0
Minor
- Added a new overridable
executemiddleware optionexecute, to optionally replace GraphQL.jsexecute. This adds support forgraphql-jit.
Patch
- Updated dev dependencies.
- Added a new
hard-rejectiondev dependency to ensure unhandled rejections in tests exit the process with an error. - Reorganized the test files.
- Simplified
test/index.js. - Tweaked some test names.
- Reduced the
executemiddleware per request validation work. - Better handling of invalid GraphQL operation
variablesand GraphQL execution errors.
Version 4.0.0
Major
- ESM is no longer published, due to CJS/ESM compatibility issues across recent Node.js versions.
- The file structure and non-index file exports have changed. This should only affect projects using undocumented deep imports.
Patch
- Stop testing the
statusCodeproperty of HTTP errors; they are inconsequential as Koa uses thestatusproperty.
Version 3.0.0
Major
- Updated Node.js support from v8.5+ to v10+.
- Updated dev dependencies, some of which require newer Node.js versions that v8.5.
Minor
- Added a package
modulefield. - Setup GitHub Sponsors funding:
- Added
.github/funding.ymlto display a sponsor button in GitHub. - Added a
package.jsonfundingfield to enable npm CLI funding features.
- Added
Patch
- Removed the now redundant
eslint-plugin-import-order-alphabeticaldev dependency. - Stop using
huskyandlint-staged. - Replaced the
tapdev dependency withtest-directorandcoverage-node, and refactored tests accordingly. - Added a new
babel-plugin-transform-require-extensionsdev dependency and ensured ESM import specifiers in both source and published.mjsfiles contain file names with extensions, which are mandatory in the final Node.js ESM implementation. Published CJS.jsfiles now also have file extensions inrequirepaths. - Updated the package description and keywords.
- Updated code examples to use CJS instead of ESM.
- Removed
package-lock.jsonfrom.gitignoreand.prettierignoreas it’s disabled in.npmrcanyway. - Use strict mode for scripts.
- Use GitHub Actions instead of Travis for CI.
- Use jsDelivr for the readme logo instead of RawGit as they are shutting down.
Version 2.2.0
Minor
- Added a new
executemiddlewarevalidationRulesoption.
Patch
- Updated dev dependencies.
- Ensure only desired
executemiddleware options apply to the GraphQLexecutefunction. - Move tests to files adjacent to source files.
- Renamed the
isPlainObjecthelper toisEnumerableObjectand added tests. - Moved
isEnumerableObjectchecks into thecheckOptionshelper and added tests. - Renamed the
checkSchemahelper tocheckGraphQLSchemaand added tests. - Tweaked option related error messages.
- Significantly simplified test assertions using
t.throwsandt.match. - Moved JSDoc type defs into
src/index.js. - Renamed the
MiddlewareOptionsOverrideJSDoc type toExecuteOptionsOverride. - Tweaked JSDoc descriptions.
- Consistent JSDoc syntax style for array types.
- Prettier
errorHandlerJSDoc example source code formatting. - Moved an
executemiddleware constant from function to module scope. - Added “Minor” and “Patch” subheadings to old changelog entries.
Version 2.1.0
Minor
executemiddleware now throws an appropriate error when theschemaoption is undefined, without an override.
Patch
- Updated dependencies.
- Cleaner readme “API” section table of contents with “See” and “Examples” headings excluded, thanks to
jsdoc-mdv3.1.0. - Removed the
watchscript andwatchdev dependency. - Redid the test scripts and added a
.nycrc.jsonfile for improved reporting and code coverage. - Simplified the
prepublishOnlyscript. - Reduced the size of the published
package.jsonby moving dev tool config to files. - Removed the package
modulefield. By default webpack resolves extensionless paths the same way Node.js (prior to v12) in--experimental-modulesmode does;.mjsfiles are preferred. Tools misconfigured or unable to resolve.mjscan get confused whenmodulepoints to an.mjsESM file and they attempt to resolve named imports from.jsCJS files. - Enforced 100% code coverage for tests.
- Test
errorHandlermiddleware handles an error correctly afterctx.response.bodywas set. - Added the Open Graph image design to the logo Sketch file.
Version 2.0.0
Major
- Errors thrown in resolvers without an
expose: trueproperty have their message masked byInternal Server Errorin the response body to prevent client exposure. Koa app listeners and middleware still have access to the original errors.
Version 1.1.2
Patch
- Fix event listeners added in v1.1.1 to be compatible with Node.js < v10.
- Downgrade
node-fetchto fix--experimental-modulestests for Node.js < v10.2.0 (see bitinn/node-fetch#502).
Version 1.1.1
Patch
- Updated dependencies.
- Updated package scripts and config for the new
huskyversion. - Silence the
http-errors deprecated non-error status code; use only 4xx or 5xx status codeswarnings that appear (due to jshttp/http-errors#50) when there are GraphQL errors. - Expanded the source into separate files for easier code navigation.
- Add a project logo.