diff --git a/src/scalars/Json.ts b/src/scalars/Json.ts index 212763b63..6ecc76d5c 100644 --- a/src/scalars/Json.ts +++ b/src/scalars/Json.ts @@ -1,5 +1,5 @@ import { GraphQLScalarType } from 'graphql' -import { JSONObjectResolver } from 'graphql-scalars' +import { JSONResolver } from 'graphql-scalars' import { asNexusMethod } from 'nexus' /** @@ -32,7 +32,7 @@ import { asNexusMethod } from 'nexus' */ export const Json = asNexusMethod( new GraphQLScalarType({ - ...JSONObjectResolver, + ...JSONResolver, // Override the default 'JsonObject' name with one that matches what Nexus Prisma expects. name: 'Json', }), diff --git a/tests/unit/graphqlSchema/__snapshots__/json.test.ts.snap b/tests/unit/graphqlSchema/__snapshots__/json.test.ts.snap index d7c4841fa..68c888f57 100644 --- a/tests/unit/graphqlSchema/__snapshots__/json.test.ts.snap +++ b/tests/unit/graphqlSchema/__snapshots__/json.test.ts.snap @@ -17,7 +17,7 @@ A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the \`da scalar DateTime \\"\\"\\" -The \`JSONObject\` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). +The \`JSON\` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). \\"\\"\\" scalar Json @specifiedBy(url: \\"http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf\\")