Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@eucalyptusvc/schema-constructor

Package Overview
Dependencies
Maintainers
2
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eucalyptusvc/schema-constructor

This is a dedicated module for creating a Prisma Schema.

  • 1.1.2
  • unpublished
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
2
Weekly downloads
 
Created
Source

@eucalyptusvc/schema-constructor

This is a helper for the engine to construct a prisma schema & combine GraphQL middlewares.

Install

With yarn:

yarn add @eucalyptusvc/schema-constructor

With npm:

npm install @eucalyptusvc/schema-constructor

Usage

import { schemaConstructor } from '@eucalyptusvc/schema-constructor';
import { prisma } from './generated/prisma-client';
import { permissions } from './app/permissions';
import * as allTypes from './app/resolvers';
import datamodelInfo from './generated/nexus-prisma';

const schema = schemaConstructor({
  types: allTypes,
  datamodelInfo,
  prismaClient: prisma,
  outputs: {
    schema: path.join(__dirname, './generated/schema.graphql'),
    typegen: path.join(__dirname, './generated/nexus.ts'),
  },
  typegenAutoConfig: {
    sources: [
      {
        source: path.join(__dirname, './types.ts'),
        alias: 'types',
      },
    ],
    contextType: 'types.Context',
  },
  middlewares: [permissions],
});

Development

  1. Install dependencies using yarn install or npm install
  2. Start development server using yarn watch

FAQs

Package last updated on 30 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc