Skip to content

Instantly share code, notes, and snippets.

@kuccello
Created January 24, 2022 21:29
Show Gist options
  • Save kuccello/fb39a4cfe24ef10401629250d786b6e2 to your computer and use it in GitHub Desktop.
Save kuccello/fb39a4cfe24ef10401629250d786b6e2 to your computer and use it in GitHub Desktop.
import { config, list } from '@keystone-6/core';
import { text } from '@keystone-6/core/fields';
import { Lists } from '.keystone/types';
const Post: Lists.Post = list({
fields: {
title: text({ validation: { isRequired: true } }),
slug: text({ isIndexed: 'unique', isFilterable: true }),
content: text(),
},
});
export default config({
db: { provider: 'postgresql', url: 'postgres://app_admin:sup3rs3cr3t@localhost:11032/app_db' },
experimental: {
generateNextGraphqlAPI: true,
generateNodeAPI: true,
},
lists: { Post },
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment