How to use the @keystonejs/app-graphql.GraphQLApp function in @keystonejs/app-graphql

To help you get started, we’ve selected a few @keystonejs/app-graphql 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 keystonejs / keystone / packages / test-utils / lib / test-utils.js View on Github external
knexOptions: { connection: process.env.KNEX_URI || 'postgres://localhost/keystone' },
    }),
  }[adapterName];

  const keystone = new Keystone({
    name,
    adapter: new Adapter(await argGenerator()),
    defaultAccess: { list: true, field: true },
    schemaNames,
    ...keystoneOptions,
  });

  createLists(keystone);

  const apps = [
    new GraphQLApp({
      schemaName,
      apiPath: '/admin/api',
      graphiqlPath: '/admin/graphiql',
      apollo: {
        tracing: true,
        cacheControl: {
          defaultMaxAge: 3600,
        },
      },
      ...graphqlOptions,
    }),
  ];

  const { middlewares } = await keystone.prepare({ dev: true, apps });

  const app = express();

@keystonejs/app-graphql

KeystoneJS GraphQL App.

MIT
Latest version published 1 year ago

Package Health Score

58 / 100
Full package analysis

Popular @keystonejs/app-graphql functions

Similar packages