chore: removes schemaOutputFile prop in alpha

This commit is contained in:
PatrikKozak
2024-03-08 15:58:37 -05:00
parent f43de11121
commit 28f10ffc25
9 changed files with 0 additions and 29 deletions

View File

@@ -16,19 +16,6 @@ Run the following command in a Payload project to generate your project's GraphQ
payload generate:graphQLSchema
```
You can run this command whenever you need to regenerate your GraphQL schema and output it to a file, and then you can use the schema for writing your own GraphQL elsewhere in other projects.
### Custom output file path
```js
{
// the remainder of your config
graphQL: {
schemaOutputFile: path.resolve(__dirname, './graphql/schema.graphql'),
},
}
```
### Custom Field Schemas
For `array`, `block`, `group` and named `tab` fields, you can generate top level reusable interfaces. The following group field config:

View File

@@ -23,7 +23,6 @@ At the top of your Payload config you can define all the options to manage Graph
| `maxComplexity` | A number used to set the maximum allowed complexity allowed by requests [More](/docs/graphql/overview#query-complexity-limits) |
| `disablePlaygroundInProduction` | A boolean that if false will enable the GraphQL playground, defaults to true. [More](/docs/graphql/overview#graphql-playground) |
| `disable` | A boolean that if true will disable the GraphQL entirely, defaults to false. |
| `schemaOutputFile` | A string for the file path used by the generate schema command. Defaults to `graphql.schema` next to `payload.config.ts` [More](/docs/graphql/graphql-schema) |
## Collections

View File

@@ -28,7 +28,6 @@ export const defaults: Omit<Config, 'db' | 'editor' | 'secret'> = {
graphQL: {
disablePlaygroundInProduction: true,
maxComplexity: 1000,
schemaOutputFile: `${typeof process?.cwd === 'function' ? process.cwd() : ''}/schema.graphql`,
},
hooks: {},
localization: false,

View File

@@ -111,7 +111,6 @@ export default joi.object({
maxComplexity: joi.number(),
mutations: joi.function(),
queries: joi.function(),
schemaOutputFile: joi.string(),
}),
hooks: joi.object().keys({
afterError: joi.func(),

View File

@@ -597,7 +597,6 @@ export type Config = {
* @see https://payloadcms.com/docs/graphql/extending
*/
queries?: GraphQLExtension
schemaOutputFile?: string
}
/**
* Tap into Payload-wide hooks.

View File

@@ -14,10 +14,6 @@ export default buildConfigWithDefaults({
MenuGlobal,
// ...add more globals here
],
graphQL: {
schemaOutputFile: './test/_community/schema.graphql',
},
onInit: async (payload) => {
await payload.create({
collection: 'users',

View File

@@ -358,7 +358,6 @@ export default buildConfigWithDefaults({
},
}
},
schemaOutputFile: path.resolve(dirname, 'schema.graphql'),
},
onInit: async (payload) => {
await payload.create({

View File

@@ -5,10 +5,6 @@ import Uploads from './collections/Upload/index.js'
export default buildConfigWithDefaults({
collections: [ErrorFieldsCollection, Uploads],
graphQL: {
schemaOutputFile: './test/field-error-states/schema.graphql',
},
onInit: async (payload) => {
await payload.create({
collection: 'users',

View File

@@ -6,9 +6,6 @@ const filename = fileURLToPath(import.meta.url)
const dirname = path.dirname(filename)
export default buildConfigWithDefaults({
graphQL: {
schemaOutputFile: path.resolve(dirname, 'schema.graphql'),
},
typescript: {
outputFile: path.resolve(dirname, 'schema.ts'),
},