From 3e1bbe83019a10c669086925d99ec1f86707072f Mon Sep 17 00:00:00 2001 From: Tirth Jain Date: Wed, 17 Jun 2020 23:24:51 +0530 Subject: [PATCH] Change default resolveType to use User defined __resolveType when available --- src/augment/resolvers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/augment/resolvers.js b/src/augment/resolvers.js index 70772f63..2d805484 100644 --- a/src/augment/resolvers.js +++ b/src/augment/resolvers.js @@ -110,7 +110,7 @@ export const augmentResolvers = ({ resolvers[e] = {}; resolvers[e]['__resolveType'] = (obj, context, info) => { - return obj['FRAGMENT_TYPE']; + return obj['__typeName'] ? obj['__typeName'] : obj['FRAGMENT_TYPE']; }; });