Skip to content

Commit

Permalink
Tighter context typing for GraphQLServerOptions (#919)
Browse files Browse the repository at this point in the history
  • Loading branch information
majelbstoat authored and abernix committed Apr 18, 2018
1 parent f8ca710 commit f387a1c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/apollo-server-core/src/graphqlOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ import { CacheControlExtensionOptions } from 'apollo-cache-control';
* - (optional) debug: a boolean that will print additional debug logging if execution errors occur
*
*/
export interface GraphQLServerOptions {
export interface GraphQLServerOptions<TContext = any> {
schema: GraphQLSchema;
formatError?: Function;
rootValue?: any;
context?: any;
context?: TContext;
logFunction?: LogFunction;
formatParams?: Function;
validationRules?: Array<(context: ValidationContext) => any>;
formatResponse?: Function;
fieldResolver?: GraphQLFieldResolver<any, any>;
fieldResolver?: GraphQLFieldResolver<any, TContext>;
debug?: boolean;
tracing?: boolean;
cacheControl?: boolean | CacheControlExtensionOptions;
Expand Down

0 comments on commit f387a1c

Please sign in to comment.