Files
payloadcms/test/_community/config.ts
Jarrod Flesch f9de807daa Fix: correct graphql param types (#2696)
* chore: colocates gql schema field types with operators
* chore: adds missing `json` gql field schema
* fix: corrects graphql `id` type from JSON to String
2023-05-23 15:27:35 -04:00

39 lines
863 B
TypeScript

import { buildConfig } from '../buildConfig';
import { PostsCollection, postsSlug } from './collections/Posts';
import { MenuGlobal } from './globals/Menu';
import { devUser } from '../credentials';
import { MediaCollection } from './collections/Media';
export default buildConfig({
// ...extend config here
collections: [
PostsCollection,
MediaCollection,
// ...add more collections here
],
globals: [
MenuGlobal,
// ...add more globals here
],
graphQL: {
schemaOutputFile: './test/_community/schema.graphql',
},
onInit: async (payload) => {
await payload.create({
collection: 'users',
data: {
email: devUser.email,
password: devUser.password,
},
});
await payload.create({
collection: postsSlug,
data: {
text: 'example post',
},
});
},
});