Skip to content

Commit

Permalink
chore(deps): update graphql to 15.4 and other deps
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalLytek committed Feb 1, 2021
1 parent d508613 commit aab8be8
Show file tree
Hide file tree
Showing 12 changed files with 10,041 additions and 9,313 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
- **Breaking Change**: `AuthChecker` type is now "function or class" - update to `AuthCheckerFn` if the function form is needed in the code
- support class-based auth checker, which allows for dependency injection
- allow defining directives for interface types and theirs fields, with inheritance for object types fields (#744)
### Others
- **Breaking Change**: update `graphql-js` peer dependency to `^15.4.0`

## v1.1.1
### Fixes
Expand Down
2 changes: 1 addition & 1 deletion examples/redis-subscriptions/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import "reflect-metadata";
import { ApolloServer } from "apollo-server";
import * as Redis from "ioredis";
import Redis from "ioredis";
import { RedisPubSub } from "graphql-redis-subscriptions";
import { buildSchema } from "../../src";

Expand Down
2 changes: 2 additions & 0 deletions examples/using-container/recipe-resolver.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { Service } from "typedi";
import { Resolver, Query, FieldResolver, Arg, Root, Mutation } from "../../src";

import { Recipe } from "./recipe-type";
import { RecipeService } from "./recipe-service";
import { RecipeInput } from "./recipe-input";

@Service()
@Resolver(of => Recipe)
export class RecipeResolver {
constructor(
Expand Down
4 changes: 2 additions & 2 deletions examples/using-scoped-container/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async function bootstrap() {
// we need to provide unique context with `requestId` for each request
context: (): Context => {
const requestId = Math.floor(Math.random() * Number.MAX_SAFE_INTEGER); // uuid-like
const container = Container.of(requestId); // get scoped container
const container = Container.of(requestId.toString()); // get scoped container
const context = { requestId, container }; // create our context
container.set("context", context); // place context or other data in container
return context;
Expand All @@ -35,7 +35,7 @@ async function bootstrap() {
requestDidStart: () => ({
willSendResponse(requestContext: GraphQLRequestContext<Context>) {
// remember to dispose the scoped container to prevent memory leaks
Container.reset(requestContext.context.requestId);
Container.reset(requestContext.context.requestId.toString());

// for developers curiosity purpose, here is the logging of current scoped container instances
// we can make multiple parallel requests to see in console how this works
Expand Down
Loading

0 comments on commit aab8be8

Please sign in to comment.