How to use the gqliteral.makeSchemaWithMetadata function in gqliteral

To help you get started, we’ve selected a few gqliteral 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 prisma-labs / nexus-prisma / plugin / index.ts View on Github external
export function buildPrismaSchema(options: PrismaSchemaConfig) {
  const { schema, metadata } = makeSchemaWithMetadata(
    options,
    PrismaSchemaBuilder,
  )

  // Only in development envs do we want to worry about regenerating the
  // schema definition and/or generated types.
  const {
    shouldGenerateArtifacts = process.env.NODE_ENV !== "production",
  } = options;

  if (shouldGenerateArtifacts) {
    // Generating in the next tick allows us to use the schema
    // in the optional thunk for the typegen config
    metadata.generateArtifacts(schema);
  }

gqliteral

Scalable, strongly typed GraphQL schema development

MIT
Latest version published 6 years ago

Package Health Score

56 / 100
Full package analysis

Similar packages