diff --git a/packages/graphql/src/schema/fieldToWhereInputSchemaMap.ts b/packages/graphql/src/schema/fieldToWhereInputSchemaMap.ts index 99d95af0c..f36b4e5ca 100644 --- a/packages/graphql/src/schema/fieldToWhereInputSchemaMap.ts +++ b/packages/graphql/src/schema/fieldToWhereInputSchemaMap.ts @@ -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 }, }, }), }