Skip to content

Commit

Permalink
allow merging scalars (#1746)
Browse files Browse the repository at this point in the history
just not specified scalars
  • Loading branch information
yaacovCR committed Jul 8, 2020
1 parent 9e9c0bd commit d463d77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/stitch/src/typeCandidates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import {
GraphQLDirective,
ASTNode,
isSchema,
isScalarType,
SchemaDefinitionNode,
SchemaExtensionNode,
isSpecifiedScalarType,
} from 'graphql';

import { wrapSchema } from '@graphql-tools/wrap';
Expand Down Expand Up @@ -204,7 +204,7 @@ export function buildTypeMap({
typeName === operationTypeNames.query ||
typeName === operationTypeNames.mutation ||
typeName === operationTypeNames.subscription ||
(mergeTypes === true && !isScalarType(typeCandidates[typeName][0].type)) ||
(mergeTypes === true && !typeCandidates[typeName].some(candidate => isSpecifiedScalarType(candidate.type))) ||
(typeof mergeTypes === 'function' && mergeTypes(typeCandidates[typeName], typeName)) ||
(Array.isArray(mergeTypes) && mergeTypes.includes(typeName)) ||
(stitchingInfo != null && typeName in stitchingInfo.mergedTypes)
Expand Down

0 comments on commit d463d77

Please sign in to comment.