Skip to content

Latest commit

 

History

History
139 lines (78 loc) · 7.76 KB

File metadata and controls

139 lines (78 loc) · 7.76 KB

CHANGELOG

3.0.0

Major Changes

Patch Changes

2.0.0

Major Changes

  • #245 700bcc8 Thanks @renovate! - Drop support for Apollo Server 4, Koa 2, and Node.js < 22. Require Apollo Server 5, Koa 3 and Node.js >= 22.

Minor Changes

1.1.1

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.

1.1.0

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>()
      //...
    );

1.0.0

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.

0.3.0

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

0.2.1

Patch Changes

0.2.0

Minor Changes

0.1.0

Minor Changes

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

0.0.12

Patch Changes

0.0.11

Patch Changes

0.0.10

Patch Changes

0.0.9

Patch Changes

0.0.8

Patch Changes

0.0.7

Patch Changes

0.0.6

Patch Changes