File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @graphql-tools/utils ' : patch
3
+ ---
4
+
5
+ Do not map builtin scalars
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import {
14
14
GraphQLNonNull ,
15
15
GraphQLObjectType ,
16
16
GraphQLObjectTypeConfig ,
17
+ GraphQLScalarType ,
17
18
GraphQLSchema ,
18
19
GraphQLType ,
19
20
InputValueDefinitionNode ,
@@ -28,6 +29,7 @@ import {
28
29
isScalarType ,
29
30
isUnionType ,
30
31
Kind ,
32
+ specifiedScalarTypes ,
31
33
} from 'graphql' ;
32
34
import { getObjectTypeFromTypeMap } from './getObjectTypeFromTypeMap.js' ;
33
35
import {
@@ -109,7 +111,10 @@ function mapTypes(
109
111
if ( ! typeName . startsWith ( '__' ) ) {
110
112
const originalType = originalTypeMap [ typeName ] ;
111
113
112
- if ( originalType == null || ! testFn ( originalType ) ) {
114
+ if (
115
+ originalType == null ||
116
+ ( ! testFn ( originalType ) && ! specifiedScalarTypes . includes ( originalType as GraphQLScalarType ) )
117
+ ) {
113
118
newTypeMap [ typeName ] = originalType ;
114
119
continue ;
115
120
}
You can’t perform that action at this time.
0 commit comments