Skip to content

Commit

Permalink
fix: use Symbol.for() instead of adding lb/rest
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Schnee <i.am@matthew.engineer>
  • Loading branch information
mschnee authored and raymondfeng committed Jan 28, 2021
1 parent 8884874 commit 1ff2d5e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion extensions/graphql/src/graphql.container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ import {
filterByKey,
filterByServiceInterface,
} from '@loopback/core';
import {MIDDLEWARE_CONTEXT} from '@loopback/rest';
import {ExpressContext} from 'apollo-server-express/dist/ApolloServer';
import debugFactory from 'debug';
import {ContainerType, ResolverData} from 'type-graphql';
import {GraphQLBindings, GraphQLTags} from './keys';

const debug = debugFactory('loopback:graphql:container');
const MIDDLEWARE_CONTEXT = Symbol.for('loopback.middleware.context');

/**
* Context for graphql resolver resolution
Expand Down
2 changes: 1 addition & 1 deletion packages/express/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ export interface ExpressMiddlewareFactory<C> {
/**
* A symbol to store `MiddlewareContext` on the request object
*/
export const MIDDLEWARE_CONTEXT = Symbol('loopback.middleware.context');
export const MIDDLEWARE_CONTEXT = Symbol.for('loopback.middleware.context');

/**
* Constants for middleware groups
Expand Down

0 comments on commit 1ff2d5e

Please sign in to comment.