This is the first of two Pull Requests implementing the desired nexus-prisma-like feature set proposed in #4
This PR contains:
A text parser that parses @Pothos.omit() commands from the Prisma schema.
Rename configs to the more standardized config, and the exposed ConfigsOptions to Config
Separated Config (the user-defined config object) from ConfigInternal (the internally-used config object with default values inserted where the user has not specified a value) for better type-safety and DRY default values.
Renamed, reworked and removed various configuration options and made config a default export, so now it may be defined as such (inspired by Vite Docs):
- Add linting and formatting to the repository
- Restructure package.json dependencies such that they are installed correctly
- Added MIT license field (because yarn was complaining, may be changed later)
This PR does not do:
- Updated docs on how @Pothos.omit() works
- @Pothos.omit() testing
- Any CRUD related stuff (that will be PR 2)
@saphewilliam
I have read, tested and really appreciated your work here
Thank you very much for your contribution, it was a great improvement in the project
This is the first of two Pull Requests implementing the desired nexus-prisma-like feature set proposed in #4
This PR contains:
configs
to the more standardizedconfig
, and the exposedConfigsOptions
toConfig
Config
(the user-defined config object) fromConfigInternal
(the internally-used config object with default values inserted where the user has not specified a value) for better type-safety and DRY default values./* @type {import('prisma-generator-pothos-codegen').Config} / module.exports = { inputs: { outputFilePath: './src/graphql/generated/inputs.ts', }, crud: { outputDir: './src/graphql/generated/', inputsImporter: 'import * as Inputs from "@graphql/generated/inputs";', }, global: { builderImporter: 'import { builder } from "@graphql/builder";', }, };