Skip to content

Commit

Permalink
Add optional logger to GraphQLServiceContext and `GraphQLRequestC…
Browse files Browse the repository at this point in the history
…ontext`.

A follow-up commit will make these required!
  • Loading branch information
abernix committed Mar 16, 2020
1 parent 39913c3 commit ff20305
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/apollo-server-types/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export type WithRequired<T, K extends keyof T> = T & Required<Pick<T, K>>;
type Mutable<T> = { -readonly [P in keyof T]: T[P] };

export interface GraphQLServiceContext {
logger?: Logger;
schema: GraphQLSchema;
schemaHash: string;
engine: {
Expand Down Expand Up @@ -62,6 +63,8 @@ export interface GraphQLRequestContext<TContext = Record<string, any>> {
readonly request: GraphQLRequest;
readonly response?: GraphQLResponse;

logger?: Logger;

readonly context: TContext;
readonly cache: KeyValueCache;

Expand Down

0 comments on commit ff20305

Please sign in to comment.