Skip to content

Releases: apollo-server-integrations/apollo-server-integration-koa

v1.1.1

06 Jun 14:47
2b7d05a
Compare
Choose a tag to compare

Patch Changes

  • #132 01fa9d1 Thanks @ryota-ka! - Parameterize KoaContextFunctionArgument and KoaMiddlewareOptions so that the ctx parameter in the context function is correctly typed when this library is used along with a context-parameterized Koa app.

v1.1.0

03 Jun 02:52
89b6848
Compare
Choose a tag to compare

Minor Changes

  • #130 c504479 Thanks @ryota-ka! - Parameterize the returned Middleware type so that this library can be used along with a context-parameterized Koa app.

    In order to utilize this feature, provide your Koa app's State and Context types as type arguments to the koaMiddleware function.

    If you use a context function (for Apollo Server), the State and Context types are positions 1 and 2 like so:

    type KoaState = { state: object };
    type KoaContext = { context: object };
    
    koaMiddleware<GraphQLContext, KoaState, KoaContext>(
      new ApolloServer<GraphQLContext>(),
      //...
      {
        context: async ({ ctx }) => ({ graphqlContext: {} }),
      },
    );

    If you don't use a context function, the State and Context types are positions 0 and 1 like so:

    type KoaState = { state: object };
    type KoaContext = { context: object };
    
    koaMiddleware<KoaState, KoaContext>(
      new ApolloServer<GraphQLContext>(),
      //...
    );

v1.0.0

26 Apr 17:50
3da85f6
Compare
Choose a tag to compare

Major Changes

  • #117 4567c98 Thanks @trevor-scheer! - Drop support for Node.js 14, require v16+

    The only change required for users to take this update is to upgrade their Node.js version to v16+. No other breaking changes.

v0.3.0

20 Feb 20:17
aa67d1c
Compare
Choose a tag to compare

Minor Changes

  • #85 bb28b66 Thanks @laverdet! - Implement support for the @defer directive. In order to use this feature, you must be using an appropriate version of graphql. At the time of writing this, @defer is only available in v17 alpha versions of the graphql package, which is currently not officially supported. Due to peer dependencies, you must install graphql like so in order to force v17:
    npm i graphql@alpha --legacy-peer-deps

v0.2.1

01 Nov 23:24
2825413
Compare
Choose a tag to compare

Patch Changes

v0.2.0

10 Oct 23:05
8ee79e8
Compare
Choose a tag to compare

Minor Changes

v0.1.0

27 Sep 17:30
f5f2873
Compare
Choose a tag to compare

Minor Changes

  • #19 61106d1 Thanks @matthew-gordon! - Update Apollo Server dependencies, add explicit non-support for incremental delivery for now"

v0.0.12

21 Sep 15:46
f653332
Compare
Choose a tag to compare

Patch Changes

v0.0.11

20 Sep 05:40
212fed5
Compare
Choose a tag to compare

Patch Changes

v0.0.10

20 Sep 05:25
e3da94f
Compare
Choose a tag to compare

Patch Changes