chore: fix graphql json import

This commit is contained in:
James
2024-03-07 21:42:24 -05:00
parent 95acf71dbf
commit 9e1d633244

View File

@@ -1,5 +1,5 @@
import { GraphQLEnumType, GraphQLInputObjectType } from 'graphql'
import GraphQLJSON from 'graphql-type-json'
import GraphQLJSONImport from 'graphql-type-json'
import type {
ArrayField,
@@ -28,6 +28,9 @@ import formatName from '../utilities/formatName.js'
import recursivelyBuildNestedPaths from './recursivelyBuildNestedPaths.js'
import { withOperators } from './withOperators.js'
const GraphQLJSON = (GraphQLJSONImport ||
GraphQLJSONImport.default) as unknown as typeof GraphQLJSONImport.default
type Args = {
nestedFieldName?: string
parentName: string
@@ -96,7 +99,7 @@ const fieldToSchemaMap = ({ nestedFieldName, parentName }: Args): any => ({
),
}),
},
value: { type: GraphQLJSON.default },
value: { type: GraphQLJSON },
},
}),
}