Skip to content

Releases: jaydenseric/graphql-api-koa

Version 4.1.2

27 Apr 06:04
Compare
Choose a tag to compare

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 via http-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 a 200 status. This allowed the removal of the createHttpError 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 payload errors array, even if the error message is not exposed via an expose property.
    • Added new ErrorKoaMiddleware and ErrorGraphQLResolver JSDoc typedefs to better document the special properties errors may have for the errorHandler Koa middleware to use to determine how the error appears in the response payload errors array and the response HTTP status code.
    • Documented that additional custom Koa middleware can be used to customize the response.
  • Renamed the startServer test helper to listen.

Version 4.1.1

14 Jan 00:12
Compare
Choose a tag to compare

Patch

  • Updated dev dependencies.
  • Use isobject for checking if values are enumerable, non-array objects.
  • Destructure GraphQL execute results.

Version 4.1.0

07 Jan 03:37
Compare
Choose a tag to compare

Minor

Patch

  • Updated dev dependencies.
  • Added a new hard-rejection dev 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 execute middleware per request validation work.
  • Better handling of invalid GraphQL operation variables and GraphQL execution errors.

Version 4.0.0

28 Dec 23:57
Compare
Choose a tag to compare

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 statusCode property of HTTP errors; they are inconsequential as Koa uses the status property.

Version 3.0.0

28 Dec 10:59
Compare
Choose a tag to compare

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 module field.
  • Setup GitHub Sponsors funding:
    • Added .github/funding.yml to display a sponsor button in GitHub.
    • Added a package.json funding field to enable npm CLI funding features.

Patch

Version 2.2.0

12 Aug 09:45
Compare
Choose a tag to compare

Minor

  • Added a new execute middleware validationRules option.

Patch

  • Updated dev dependencies.
  • Ensure only desired execute middleware options apply to the GraphQL execute function.
  • Move tests to files adjacent to source files.
  • Renamed the isPlainObject helper to isEnumerableObject and added tests.
  • Moved isEnumerableObject checks into the checkOptions helper and added tests.
  • Renamed the checkSchema helper to checkGraphQLSchema and added tests.
  • Tweaked option related error messages.
  • Significantly simplified test assertions using t.throws and t.match.
  • Moved JSDoc type defs into src/index.js.
  • Renamed the MiddlewareOptionsOverride JSDoc type to ExecuteOptionsOverride.
  • Tweaked JSDoc descriptions.
  • Consistent JSDoc syntax style for array types.
  • Prettier errorHandler JSDoc example source code formatting.
  • Moved an execute middleware constant from function to module scope.
  • Added “Minor” and “Patch” subheadings to old changelog entries.

Version 2.1.0

31 Jul 09:18
Compare
Choose a tag to compare

Minor

  • execute middleware now throws an appropriate error when the schema option is undefined, without an override.

Patch

  • Updated dependencies.
  • Cleaner readme “API” section table of contents with “See” and “Examples” headings excluded, thanks to jsdoc-md v3.1.0.
  • Removed the watch script and watch dev dependency.
  • Redid the test scripts and added a .nycrc.json file for improved reporting and code coverage.
  • Simplified the prepublishOnly script.
  • Reduced the size of the published package.json by moving dev tool config to files.
  • Removed the package module field. By default webpack resolves extensionless paths the same way Node.js (prior to v12) in --experimental-modules mode does; .mjs files are preferred. Tools misconfigured or unable to resolve .mjs can get confused when module points to an .mjs ESM file and they attempt to resolve named imports from .js CJS files.
  • Enforced 100% code coverage for tests.
  • Test errorHandler middleware handles an error correctly after ctx.response.body was set.
  • Added the Open Graph image design to the logo Sketch file.

Version 2.0.0

11 Oct 09:24
Compare
Choose a tag to compare

Major

  • Errors thrown in resolvers without an expose: true property have their message masked by Internal Server Error in the response body to prevent client exposure. Koa app listeners and middleware still have access to the original errors.

Version 1.1.2

11 Oct 05:45
Compare
Choose a tag to compare

Patch

  • Fix event listeners added in v1.1.1 to be compatible with Node.js < v10.
  • Downgrade node-fetch to fix --experimental-modules tests for Node.js < v10.2.0 (see bitinn/node-fetch#502).

Version 1.1.1

11 Oct 04:26
Compare
Choose a tag to compare

Patch

  • Updated dependencies.
  • Updated package scripts and config for the new husky version.
  • Silence the http-errors deprecated non-error status code; use only 4xx or 5xx status codes warnings 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.