File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,11 @@ import {
11
11
GraphQLSchema ,
12
12
GraphQLType ,
13
13
GraphQLUnionType ,
14
+ isInterfaceType ,
15
+ isListType ,
16
+ isNonNullType ,
17
+ isObjectType ,
18
+ isUnionType ,
14
19
Kind ,
15
20
} from "graphql" ;
16
21
import * as graphql from "graphql" ;
@@ -51,10 +56,7 @@ function makeConvertType(toStrict: boolean) {
51
56
return ( ) => {
52
57
return Object . fromEntries (
53
58
Object . entries ( fields ) . map ( ( [ fieldName , inSpec ] ) => {
54
- const spec = applySemanticNonNullDirectiveToFieldConfig (
55
- inSpec ,
56
- toStrict ,
57
- ) ;
59
+ const spec = convertFieldConfig ( inSpec , toStrict ) ;
58
60
return [
59
61
fieldName ,
60
62
{
@@ -155,11 +157,11 @@ function makeConvertType(toStrict: boolean) {
155
157
/**
156
158
* Takes a GraphQL field config and checks to see if the `@semanticNonNull`
157
159
* directive was applied; if so, converts to a field config that adds
158
- * GraphQLNonNull wrapper types in the relevant places if toStrict is true.
160
+ * GraphQLNonNull wrapper types in the relevant places if ` toStrict` is true.
159
161
*
160
162
* @see {@url https://www.apollographql.com/docs/kotlin/advanced/nullability/#semanticnonnull }
161
163
*/
162
- export function applySemanticNonNullDirectiveToFieldConfig (
164
+ export function convertFieldConfig (
163
165
spec : GraphQLFieldConfig < unknown , unknown , unknown > ,
164
166
toStrict : boolean ,
165
167
) : GraphQLFieldConfig < unknown , unknown , unknown > {
You can’t perform that action at this time.
0 commit comments