How to use @keystonejs/adapter-knex - 1 common examples

To help you get started, we’ve selected a few @keystonejs/adapter-knex examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DefinitelyTyped / DefinitelyTyped / types / keystonejs__keystone / keystonejs__keystone-tests.ts View on Github external
import { Keystone, BaseApp } from '@keystonejs/keystone';
import { PasswordAuthStrategy } from '@keystonejs/auth-password';
import { GraphQLApp } from '@keystonejs/app-graphql';
import { AdminUIApp } from '@keystonejs/app-admin-ui';
import { KnexAdapter as Adapter } from '@keystonejs/adapter-knex';
import { Text, Checkbox, Password, AutoIncrement, CalendarDay, Integer } from '@keystonejs/fields';
import { NextApp } from '@keystonejs/app-next';
import { StaticApp } from '@keystonejs/app-static';

const keystone = new Keystone({
    name: 'LiveCorp Backend',
    adapter: new Adapter(),
});

keystone.createList('Test', {
    fields: {},
    access: true,
});
keystone.createList('Test', {
    fields: {
        autoincrement: { type: AutoIncrement, gqlType: 'ID' },
        calendar: {
            type: CalendarDay,
            format: 'Do MMMM YYYY',
            yearRangeFrom: 1901,
            yearRangeTo: 2018,
            yearPickerType: 'auto',
        },

@keystonejs/adapter-knex

KeystoneJS Knex Database Adapter

MIT
Latest version published 3 years ago

Package Health Score

57 / 100
Full package analysis

Popular @keystonejs/adapter-knex functions

Similar packages