mirror of
https://github.com/vale981/apollo-server
synced 2025-03-15 23:36:40 -04:00
28 lines
1,003 B
TypeScript
28 lines
1,003 B
TypeScript
![]() |
import * as graphql from 'graphql';
|
||
|
|
||
|
/*
|
||
|
* ExpressApolloOptions
|
||
|
*
|
||
|
* - schema: an executable GraphQL schema used to fulfill requests.
|
||
|
* - (optional) formatError: Formatting function applied to all errors before response is sent
|
||
|
* - (optional) rootValue: rootValue passed to GraphQL execution
|
||
|
* - (optional) context: the context passed to GraphQL execution
|
||
|
* - (optional) logFunction: a function called for logging events such as execution times
|
||
|
* - (optional) formatParams: a function applied to the parameters of every invocation of runQuery
|
||
|
* - (optional) validationRules: extra validation rules applied to requests
|
||
|
* - (optional) formatResponse: a function applied to each graphQL execution result
|
||
|
*
|
||
|
*/
|
||
|
interface ApolloOptions {
|
||
|
schema: graphql.GraphQLSchema;
|
||
|
formatError?: Function;
|
||
|
rootValue?: any;
|
||
|
context?: any;
|
||
|
logFunction?: Function;
|
||
|
formatParams?: Function;
|
||
|
validationRules?: Array<graphql.ValidationRule>;
|
||
|
formatResponse?: Function;
|
||
|
}
|
||
|
|
||
|
export default ApolloOptions;
|