apollo-server-core
Advanced tools
Comparing version 1.0.3-tracing.3 to 1.1.0
@@ -1,2 +0,2 @@ | ||
import { GraphQLSchema, ValidationContext } from 'graphql'; | ||
import { GraphQLSchema, ValidationContext, GraphQLFieldResolver } from 'graphql'; | ||
import { LogFunction } from './runQuery'; | ||
@@ -12,2 +12,3 @@ export interface GraphQLServerOptions { | ||
formatResponse?: Function; | ||
fieldResolver?: GraphQLFieldResolver<any, any>; | ||
debug?: boolean; | ||
@@ -14,0 +15,0 @@ tracing?: boolean; |
@@ -150,4 +150,5 @@ "use strict"; | ||
formatResponse: optionsObject.formatResponse, | ||
fieldResolver: optionsObject.fieldResolver, | ||
debug: optionsObject.debug, | ||
tracing: optionsObject.tracing | ||
tracing: optionsObject.tracing, | ||
}; | ||
@@ -154,0 +155,0 @@ if (optionsObject.formatParams) { |
@@ -1,3 +0,3 @@ | ||
import { GraphQLSchema, DocumentNode, GraphQLError, ValidationContext } from 'graphql'; | ||
export interface GqlResponse { | ||
import { GraphQLSchema, GraphQLFieldResolver, DocumentNode, GraphQLError, ValidationContext } from 'graphql'; | ||
export interface GraphQLResponse { | ||
data?: object; | ||
@@ -38,2 +38,3 @@ errors?: Array<GraphQLError & object>; | ||
validationRules?: Array<(context: ValidationContext) => any>; | ||
fieldResolver?: GraphQLFieldResolver<any, any>; | ||
formatError?: Function; | ||
@@ -44,3 +45,3 @@ formatResponse?: Function; | ||
} | ||
declare function runQuery(options: QueryOptions): Promise<GqlResponse>; | ||
declare function runQuery(options: QueryOptions): Promise<GraphQLResponse>; | ||
export { runQuery }; |
@@ -90,3 +90,3 @@ "use strict"; | ||
logFunction({ action: LogAction.execute, step: LogStep.start }); | ||
return graphql_1.execute(options.schema, documentAST, options.rootValue, context, options.variables, options.operationName).then(function (result) { | ||
return graphql_1.execute(options.schema, documentAST, options.rootValue, context, options.variables, options.operationName, options.fieldResolver).then(function (result) { | ||
logFunction({ action: LogAction.execute, step: LogStep.end }); | ||
@@ -106,3 +106,3 @@ logFunction({ action: LogAction.request, step: LogStep.end }); | ||
response.extensions = { | ||
'tracing': apollo_tracing_1.formatTraceData(traceCollector) | ||
'tracing': apollo_tracing_1.formatTraceData(traceCollector), | ||
}; | ||
@@ -109,0 +109,0 @@ } |
{ | ||
"name": "apollo-server-core", | ||
"version": "1.0.3-tracing.3", | ||
"version": "1.1.0", | ||
"description": "Core engine for Apollo GraphQL server", | ||
@@ -28,5 +28,5 @@ "main": "dist/index.js", | ||
"@types/fibers": "0.0.29", | ||
"@types/graphql": "^0.9.0", | ||
"fibers": "1.0.15", | ||
"meteor-promise": "^0.8.2" | ||
"@types/graphql": "^0.10.2", | ||
"fibers": "^1.0.15", | ||
"meteor-promise": "^0.8.6" | ||
}, | ||
@@ -36,5 +36,2 @@ "peerDependencies": { | ||
}, | ||
"optionalDependencies": { | ||
"@types/graphql": "^0.9.0" | ||
}, | ||
"typings": "dist/index.d.ts", | ||
@@ -45,4 +42,4 @@ "typescript": { | ||
"dependencies": { | ||
"apollo-tracing": "^0.0.5" | ||
"apollo-tracing": "^0.0.7" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
55321
2
19
1100
0
+ Addedapollo-tracing@0.0.7(transitive)
- Removedapollo-tracing@0.0.5(transitive)
Updatedapollo-tracing@^0.0.7