fix: re-exports graphql json types for external use (#6711)

Fixes https://github.com/payloadcms/payload/issues/6683

Exports import `GraphQLJSON` and `GraphQLJSONObject` from
`@payloadcms/graphql/types`

```ts
import { GraphQLJSON, GraphQLJSONObject } from '@payloadcms/graphql/types'
```
This commit is contained in:
Jarrod Flesch
2024-06-10 14:53:31 -04:00
committed by GitHub
parent 9f525621c8
commit a26d03190e
2 changed files with 7 additions and 0 deletions

View File

@@ -0,0 +1 @@
export { GraphQLJSON, GraphQLJSONObject } from '../packages/graphql-type-json/index.js'

View File

@@ -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) => {