diff --git a/packages/graphql/src/exports/types.ts b/packages/graphql/src/exports/types.ts new file mode 100644 index 0000000000..454517d13f --- /dev/null +++ b/packages/graphql/src/exports/types.ts @@ -0,0 +1 @@ +export { GraphQLJSON, GraphQLJSONObject } from '../packages/graphql-type-json/index.js' diff --git a/test/custom-graphql/config.ts b/test/custom-graphql/config.ts index a75f56eb60..f0679fdb5d 100644 --- a/test/custom-graphql/config.ts +++ b/test/custom-graphql/config.ts @@ -1,3 +1,4 @@ +import { GraphQLJSON } from '@payloadcms/graphql/types' import { fileURLToPath } from 'node:url' import path from 'path' const filename = fileURLToPath(import.meta.url) @@ -35,6 +36,11 @@ export default buildConfigWithDefaults({ type: GraphQL.GraphQLString, resolve: resolveTransactionId, }, + foo: { + type: GraphQLJSON, + args: {}, + resolve: () => 'json test', + }, } }, mutations: (GraphQL) => {