UNPKG

799 BPlain TextView Raw
1diff --git a/node_modules/apollo-graphql/lib/schema/buildSchemaFromSDL.js b/node_modules/apollo-graphql/lib/schema/buildSchemaFromSDL.js
2index 874406b..b882987 100644
3--- a/node_modules/apollo-graphql/lib/schema/buildSchemaFromSDL.js
4+++ b/node_modules/apollo-graphql/lib/schema/buildSchemaFromSDL.js
5@@ -184,7 +184,13 @@ function addResolversToSchema(schema, resolvers) {
6 field.resolve = fieldConfig;
7 }
8 else {
9- field.resolve = fieldConfig.resolve;
10+ if (fieldConfig.resolve) {
11+ field.resolve = fieldConfig.resolve;
12+ }
13+
14+ if (fieldConfig.subscribe) {
15+ field.subscribe = fieldConfig.subscribe;
16+ }
17 }
18 }
19 }