Skip to content

Commit 9669fe9

Browse files
committed
Rename function
1 parent 30179ed commit 9669fe9

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/index.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ import {
1111
GraphQLSchema,
1212
GraphQLType,
1313
GraphQLUnionType,
14+
isInterfaceType,
15+
isListType,
16+
isNonNullType,
17+
isObjectType,
18+
isUnionType,
1419
Kind,
1520
} from "graphql";
1621
import * as graphql from "graphql";
@@ -51,10 +56,7 @@ function makeConvertType(toStrict: boolean) {
5156
return () => {
5257
return Object.fromEntries(
5358
Object.entries(fields).map(([fieldName, inSpec]) => {
54-
const spec = applySemanticNonNullDirectiveToFieldConfig(
55-
inSpec,
56-
toStrict,
57-
);
59+
const spec = convertFieldConfig(inSpec, toStrict);
5860
return [
5961
fieldName,
6062
{
@@ -155,11 +157,11 @@ function makeConvertType(toStrict: boolean) {
155157
/**
156158
* Takes a GraphQL field config and checks to see if the `@semanticNonNull`
157159
* 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.
159161
*
160162
* @see {@url https://www.apollographql.com/docs/kotlin/advanced/nullability/#semanticnonnull}
161163
*/
162-
export function applySemanticNonNullDirectiveToFieldConfig(
164+
export function convertFieldConfig(
163165
spec: GraphQLFieldConfig<unknown, unknown, unknown>,
164166
toStrict: boolean,
165167
): GraphQLFieldConfig<unknown, unknown, unknown> {

0 commit comments

Comments
 (0)