paljs / prisma-tools

Prisma tools to help you generate CRUD system for GraphQL servers
https://paljs.com
MIT License
688 stars 56 forks source link

paljs v2.0.0 - Unknown type "Null" #133

Closed ZenSoftware closed 4 years ago

ZenSoftware commented 4 years ago

Description

Thank you for keeping pace with the newest releases of Prisma! We really appreciate how active the Pal.js project is ⛲️. We have just tried to upgrade to Pal.js v2.0.0. Unfortunately we are getting an error of Unknown type "Null" during our makeExecutableSchema. We have a very simple schema.prisma file for our project. I have pushed a git branch of our project with the Pal.js v2.0.0 upgrade, and you can find the Pal.js code generated files here. I am not entirely sure what the problem is and thought I'd provide some early feedback for you. Cheers 🥂

Dependencies

Our package.json dependencies:

Error log

C:\a\Work\zen\node_modules\graphql\validation\validate.js:107
    throw new Error(errors.map(function (error) {
          ^
Error: Unknown type "Null".

Unknown type "Null".

Unknown type "Null".

Unknown type "Null".

Unknown type "Null".

Unknown type "Null".

Unknown type "Null".

Unknown type "Null".

Unknown type "Null".

Unknown type "Null".
    at assertValidSDL (C:\a\Work\zen\node_modules\graphql\validation\validate.js:107:11)
    at Object.buildASTSchema (C:\a\Work\zen\node_modules\graphql\utilities\buildASTSchema.js:45:34)
    at buildSchemaFromTypeDefinitions (C:\a\Work\zen\node_modules\graphql-tools\dist\schema\src\buildSchemaFromTypeDefinitions.js:9:18)
    at makeExecutableSchema (C:\a\Work\zen\node_modules\graphql-tools\dist\schema\src\makeExecutableSchema.js:64:18)
    at Module../apps/api/src/app/graphql/resolvers/index.ts (C:\a\Work\zen\dist\apps\api\webpack:\apps\api\src\app\graphql\resolvers\index.ts:20:51)

node_modules/.prisma/client/index.js

Object.defineProperty(exports, "__esModule", { value: true });

const {
  PrismaClientKnownRequestError,
  PrismaClientUnknownRequestError,
  PrismaClientRustPanicError,
  PrismaClientInitializationError,
  PrismaClientValidationError,
  getPrismaClient,
  debugLib,
  sqltag,
  sql,
  empty,
  join,
  raw
} = require('@prisma/client/runtime')

const path = require('path')
const debug = debugLib('prisma-client')

/**
 * Prisma Client JS version: 2.8.0
 * Query Engine version: e6c9b4b2b7fa162d0d459d1863321f547498fcfe
 */
exports.prismaVersion = {
  client: "2.8.0",
  engine: "e6c9b4b2b7fa162d0d459d1863321f547498fcfe"
}

exports.PrismaClientKnownRequestError = PrismaClientKnownRequestError;
exports.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError;
exports.PrismaClientRustPanicError = PrismaClientRustPanicError;
exports.PrismaClientInitializationError = PrismaClientInitializationError;
exports.PrismaClientValidationError = PrismaClientValidationError;

/**
 * Re-export of sql-template-tag
 */

exports.sql = sqltag
exports.empty = empty
exports.join = join
exports.raw = raw

/**
 * Build tool annotations
 * In order to make `ncc` and `node-file-trace` happy.
**/

path.join(__dirname, 'query-engine-windows');
path.join(__dirname, 'query-engine-linux-musl');

/**
 * Annotation for `node-file-trace`
**/
path.join(__dirname, 'schema.prisma');

/**
 * Enums
 */
// Based on
// https://github.com/microsoft/TypeScript/issues/3192#issuecomment-261720275
function makeEnum(x) { return x; }

exports.UserDistinctFieldEnum = makeEnum({
  id: 'id',
  createdAt: 'createdAt',
  email: 'email',
  firstName: 'firstName',
  lastName: 'lastName',
  password: 'password',
  roles: 'roles'
});

exports.SortOrder = makeEnum({
  asc: 'asc',
  desc: 'desc'
});

exports.Role = makeEnum({
  Registered: 'Registered',
  Admin: 'Admin'
});

exports.QueryMode = makeEnum({
  default: 'default',
  insensitive: 'insensitive'
});

/**
 * DMMF
 */
const dmmfString = "{\"datamodel\":{\"enums\":[{\"name\":\"Role\",\"values\":[{\"name\":\"Registered\",\"dbName\":null},{\"name\":\"Admin\",\"dbName\":null}],\"dbName\":null}],\"models\":[{\"name\":\"User\",\"isEmbedded\":false,\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"type\":\"String\",\"hasDefaultValue\":true,\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"type\":\"DateTime\",\"hasDefaultValue\":true,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"type\":\"String\",\"hasDefaultValue\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"firstName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"type\":\"String\",\"hasDefaultValue\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"type\":\"String\",\"hasDefaultValue\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"password\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"type\":\"String\",\"hasDefaultValue\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"roles\",\"kind\":\"enum\",\"isList\":true,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"type\":\"Role\",\"hasDefaultValue\":false,\"isGenerated\":false,\"isUpdatedAt\":false}],\"isGenerated\":false,\"idFields\":[],\"uniqueFields\":[],\"uniqueIndexes\":[]}]},\"schema\":{\"rootQueryType\":\"Query\",\"rootMutationType\":\"Mutation\",\"inputTypes\":[{\"name\":\"UserWhereInput\",\"constraints\":{\"maxNumFields\":null,\"minNumFields\":null},\"fields\":[{\"name\":\"AND\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"UserWhereInput\",\"kind\":\"object\",\"isList\":false},{\"type\":\"UserWhereInput\",\"kind\":\"object\",\"isList\":true}]},{\"name\":\"OR\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"UserWhereInput\",\"kind\":\"object\",\"isList\":false},{\"type\":\"UserWhereInput\",\"kind\":\"object\",\"isList\":true}]},{\"name\":\"NOT\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"UserWhereInput\",\"kind\":\"object\",\"isList\":false},{\"type\":\"UserWhereInput\",\"kind\":\"object\",\"isList\":true}]},{\"name\":\"id\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"StringFilter\",\"kind\":\"object\",\"isList\":false},{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"createdAt\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"DateTimeFilter\",\"kind\":\"object\",\"isList\":false},{\"type\":\"DateTime\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"email\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"StringFilter\",\"kind\":\"object\",\"isList\":false},{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"firstName\",\"isRequired\":false,\"isNullable\":true,\"inputTypes\":[{\"type\":\"StringNullableFilter\",\"kind\":\"object\",\"isList\":false},{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false},{\"type\":\"Null\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"lastName\",\"isRequired\":false,\"isNullable\":true,\"inputTypes\":[{\"type\":\"StringNullableFilter\",\"kind\":\"object\",\"isList\":false},{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false},{\"type\":\"Null\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"password\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"StringFilter\",\"kind\":\"object\",\"isList\":false},{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"roles\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"EnumRoleNullableListFilter\",\"kind\":\"object\",\"isList\":false}]}]},{\"name\":\"UserOrderByInput\",\"constraints\":{\"maxNumFields\":1,\"minNumFields\":0},\"fields\":[{\"name\":\"id\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"SortOrder\",\"kind\":\"enum\",\"isList\":false}]},{\"name\":\"createdAt\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"SortOrder\",\"kind\":\"enum\",\"isList\":false}]},{\"name\":\"email\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"SortOrder\",\"kind\":\"enum\",\"isList\":false}]},{\"name\":\"firstName\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"SortOrder\",\"kind\":\"enum\",\"isList\":false}]},{\"name\":\"lastName\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"SortOrder\",\"kind\":\"enum\",\"isList\":false}]},{\"name\":\"password\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"SortOrder\",\"kind\":\"enum\",\"isList\":false}]},{\"name\":\"roles\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"SortOrder\",\"kind\":\"enum\",\"isList\":false}]}]},{\"name\":\"UserWhereUniqueInput\",\"constraints\":{\"maxNumFields\":1,\"minNumFields\":1},\"fields\":[{\"name\":\"id\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"email\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]}]},{\"name\":\"UserCreateInput\",\"constraints\":{\"maxNumFields\":null,\"minNumFields\":null},\"fields\":[{\"name\":\"id\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"createdAt\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"DateTime\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"email\",\"isRequired\":true,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"firstName\",\"isRequired\":false,\"isNullable\":true,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false},{\"type\":\"Null\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"lastName\",\"isRequired\":false,\"isNullable\":true,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false},{\"type\":\"Null\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"password\",\"isRequired\":true,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"roles\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"UserCreaterolesInput\",\"kind\":\"object\",\"isList\":false},{\"type\":\"Role\",\"kind\":\"enum\",\"isList\":true}]}]},{\"name\":\"UserUpdateInput\",\"constraints\":{\"maxNumFields\":null,\"minNumFields\":null},\"fields\":[{\"name\":\"id\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false},{\"type\":\"StringFieldUpdateOperationsInput\",\"kind\":\"object\",\"isList\":false}]},{\"name\":\"createdAt\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"DateTime\",\"kind\":\"scalar\",\"isList\":false},{\"type\":\"DateTimeFieldUpdateOperationsInput\",\"kind\":\"object\",\"isList\":false}]},{\"name\":\"email\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false},{\"type\":\"StringFieldUpdateOperationsInput\",\"kind\":\"object\",\"isList\":false}]},{\"name\":\"firstName\",\"isRequired\":false,\"isNullable\":true,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false},{\"type\":\"NullableStringFieldUpdateOperationsInput\",\"kind\":\"object\",\"isList\":false},{\"type\":\"Null\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"lastName\",\"isRequired\":false,\"isNullable\":true,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false},{\"type\":\"NullableStringFieldUpdateOperationsInput\",\"kind\":\"object\",\"isList\":false},{\"type\":\"Null\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"password\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false},{\"type\":\"StringFieldUpdateOperationsInput\",\"kind\":\"object\",\"isList\":false}]},{\"name\":\"roles\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"UserUpdaterolesInput\",\"kind\":\"object\",\"isList\":false},{\"type\":\"Role\",\"kind\":\"enum\",\"isList\":true}]}]},{\"name\":\"UserUpdateManyMutationInput\",\"constraints\":{\"maxNumFields\":null,\"minNumFields\":null},\"fields\":[{\"name\":\"id\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false},{\"type\":\"StringFieldUpdateOperationsInput\",\"kind\":\"object\",\"isList\":false}]},{\"name\":\"createdAt\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"DateTime\",\"kind\":\"scalar\",\"isList\":false},{\"type\":\"DateTimeFieldUpdateOperationsInput\",\"kind\":\"object\",\"isList\":false}]},{\"name\":\"email\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false},{\"type\":\"StringFieldUpdateOperationsInput\",\"kind\":\"object\",\"isList\":false}]},{\"name\":\"firstName\",\"isRequired\":false,\"isNullable\":true,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false},{\"type\":\"NullableStringFieldUpdateOperationsInput\",\"kind\":\"object\",\"isList\":false},{\"type\":\"Null\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"lastName\",\"isRequired\":false,\"isNullable\":true,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false},{\"type\":\"NullableStringFieldUpdateOperationsInput\",\"kind\":\"object\",\"isList\":false},{\"type\":\"Null\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"password\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false},{\"type\":\"StringFieldUpdateOperationsInput\",\"kind\":\"object\",\"isList\":false}]},{\"name\":\"roles\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"UserUpdaterolesInput\",\"kind\":\"object\",\"isList\":false},{\"type\":\"Role\",\"kind\":\"enum\",\"isList\":true}]}]},{\"name\":\"StringFilter\",\"constraints\":{\"maxNumFields\":null,\"minNumFields\":null},\"fields\":[{\"name\":\"equals\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"in\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":true}]},{\"name\":\"notIn\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":true}]},{\"name\":\"lt\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"lte\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"gt\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"gte\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"contains\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"startsWith\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"endsWith\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"mode\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"QueryMode\",\"kind\":\"enum\",\"isList\":false}]},{\"name\":\"not\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false},{\"type\":\"NestedStringFilter\",\"kind\":\"object\",\"isList\":false}]}]},{\"name\":\"DateTimeFilter\",\"constraints\":{\"maxNumFields\":null,\"minNumFields\":null},\"fields\":[{\"name\":\"equals\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"DateTime\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"in\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"DateTime\",\"kind\":\"scalar\",\"isList\":true}]},{\"name\":\"notIn\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"DateTime\",\"kind\":\"scalar\",\"isList\":true}]},{\"name\":\"lt\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"DateTime\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"lte\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"DateTime\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"gt\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"DateTime\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"gte\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"DateTime\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"not\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"DateTime\",\"kind\":\"scalar\",\"isList\":false},{\"type\":\"NestedDateTimeFilter\",\"kind\":\"object\",\"isList\":false}]}]},{\"name\":\"StringNullableFilter\",\"constraints\":{\"maxNumFields\":null,\"minNumFields\":null},\"fields\":[{\"name\":\"equals\",\"isRequired\":false,\"isNullable\":true,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false},{\"type\":\"Null\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"in\",\"isRequired\":false,\"isNullable\":true,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":true},{\"type\":\"Null\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"notIn\",\"isRequired\":false,\"isNullable\":true,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":true},{\"type\":\"Null\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"lt\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"lte\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"gt\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"gte\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"contains\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"startsWith\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"endsWith\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"mode\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"QueryMode\",\"kind\":\"enum\",\"isList\":false}]},{\"name\":\"not\",\"isRequired\":false,\"isNullable\":true,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false},{\"type\":\"NestedStringNullableFilter\",\"kind\":\"object\",\"isList\":false},{\"type\":\"Null\",\"kind\":\"scalar\",\"isList\":false}]}]},{\"name\":\"EnumRoleNullableListFilter\",\"constraints\":{\"maxNumFields\":null,\"minNumFields\":null},\"fields\":[{\"name\":\"equals\",\"isRequired\":false,\"isNullable\":true,\"inputTypes\":[{\"type\":\"Role\",\"kind\":\"enum\",\"isList\":true},{\"type\":\"Null\",\"kind\":\"scalar\",\"isList\":false}]}]},{\"name\":\"UserCreaterolesInput\",\"constraints\":{\"maxNumFields\":null,\"minNumFields\":null},\"fields\":[{\"name\":\"set\",\"isRequired\":true,\"isNullable\":false,\"inputTypes\":[{\"type\":\"Role\",\"kind\":\"enum\",\"isList\":true}]}]},{\"name\":\"StringFieldUpdateOperationsInput\",\"constraints\":{\"maxNumFields\":1,\"minNumFields\":1},\"fields\":[{\"name\":\"set\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]}]},{\"name\":\"DateTimeFieldUpdateOperationsInput\",\"constraints\":{\"maxNumFields\":1,\"minNumFields\":1},\"fields\":[{\"name\":\"set\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"DateTime\",\"kind\":\"scalar\",\"isList\":false}]}]},{\"name\":\"NullableStringFieldUpdateOperationsInput\",\"constraints\":{\"maxNumFields\":1,\"minNumFields\":1},\"fields\":[{\"name\":\"set\",\"isRequired\":false,\"isNullable\":true,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false},{\"type\":\"Null\",\"kind\":\"scalar\",\"isList\":false}]}]},{\"name\":\"UserUpdaterolesInput\",\"constraints\":{\"maxNumFields\":null,\"minNumFields\":null},\"fields\":[{\"name\":\"set\",\"isRequired\":true,\"isNullable\":false,\"inputTypes\":[{\"type\":\"Role\",\"kind\":\"enum\",\"isList\":true}]}]},{\"name\":\"NestedStringFilter\",\"constraints\":{\"maxNumFields\":null,\"minNumFields\":null},\"fields\":[{\"name\":\"equals\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"in\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":true}]},{\"name\":\"notIn\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":true}]},{\"name\":\"lt\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"lte\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"gt\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"gte\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"contains\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"startsWith\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"endsWith\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"not\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false},{\"type\":\"NestedStringFilter\",\"kind\":\"object\",\"isList\":false}]}]},{\"name\":\"NestedDateTimeFilter\",\"constraints\":{\"maxNumFields\":null,\"minNumFields\":null},\"fields\":[{\"name\":\"equals\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"DateTime\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"in\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"DateTime\",\"kind\":\"scalar\",\"isList\":true}]},{\"name\":\"notIn\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"DateTime\",\"kind\":\"scalar\",\"isList\":true}]},{\"name\":\"lt\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"DateTime\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"lte\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"DateTime\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"gt\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"DateTime\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"gte\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"DateTime\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"not\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"DateTime\",\"kind\":\"scalar\",\"isList\":false},{\"type\":\"NestedDateTimeFilter\",\"kind\":\"object\",\"isList\":false}]}]},{\"name\":\"NestedStringNullableFilter\",\"constraints\":{\"maxNumFields\":null,\"minNumFields\":null},\"fields\":[{\"name\":\"equals\",\"isRequired\":false,\"isNullable\":true,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false},{\"type\":\"Null\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"in\",\"isRequired\":false,\"isNullable\":true,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":true},{\"type\":\"Null\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"notIn\",\"isRequired\":false,\"isNullable\":true,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":true},{\"type\":\"Null\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"lt\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"lte\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"gt\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"gte\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"contains\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"startsWith\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"endsWith\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"not\",\"isRequired\":false,\"isNullable\":true,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false},{\"type\":\"NestedStringNullableFilter\",\"kind\":\"object\",\"isList\":false},{\"type\":\"Null\",\"kind\":\"scalar\",\"isList\":false}]}]}],\"outputTypes\":[{\"name\":\"Query\",\"fields\":[{\"name\":\"findFirstUser\",\"args\":[{\"name\":\"where\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"UserWhereInput\",\"kind\":\"object\",\"isList\":false}]},{\"name\":\"orderBy\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"UserOrderByInput\",\"kind\":\"object\",\"isList\":true},{\"type\":\"UserOrderByInput\",\"kind\":\"object\",\"isList\":false}]},{\"name\":\"cursor\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"UserWhereUniqueInput\",\"kind\":\"object\",\"isList\":false}]},{\"name\":\"take\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"Int\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"skip\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"Int\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"distinct\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"UserDistinctFieldEnum\",\"kind\":\"enum\",\"isList\":true}]}],\"isRequired\":false,\"isNullable\":true,\"outputType\":{\"type\":\"User\",\"kind\":\"object\",\"isList\":false}},{\"name\":\"findManyUser\",\"args\":[{\"name\":\"where\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"UserWhereInput\",\"kind\":\"object\",\"isList\":false}]},{\"name\":\"orderBy\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"UserOrderByInput\",\"kind\":\"object\",\"isList\":true},{\"type\":\"UserOrderByInput\",\"kind\":\"object\",\"isList\":false}]},{\"name\":\"cursor\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"UserWhereUniqueInput\",\"kind\":\"object\",\"isList\":false}]},{\"name\":\"take\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"Int\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"skip\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"Int\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"distinct\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"UserDistinctFieldEnum\",\"kind\":\"enum\",\"isList\":true}]}],\"isRequired\":true,\"isNullable\":false,\"outputType\":{\"type\":\"User\",\"kind\":\"object\",\"isList\":true}},{\"name\":\"aggregateUser\",\"args\":[{\"name\":\"where\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"UserWhereInput\",\"kind\":\"object\",\"isList\":false}]},{\"name\":\"orderBy\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"UserOrderByInput\",\"kind\":\"object\",\"isList\":true},{\"type\":\"UserOrderByInput\",\"kind\":\"object\",\"isList\":false}]},{\"name\":\"cursor\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"UserWhereUniqueInput\",\"kind\":\"object\",\"isList\":false}]},{\"name\":\"take\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"Int\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"skip\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"Int\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"distinct\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"UserDistinctFieldEnum\",\"kind\":\"enum\",\"isList\":true}]}],\"isRequired\":true,\"isNullable\":false,\"outputType\":{\"type\":\"AggregateUser\",\"kind\":\"object\",\"isList\":false}},{\"name\":\"findOneUser\",\"args\":[{\"name\":\"where\",\"isRequired\":true,\"isNullable\":false,\"inputTypes\":[{\"type\":\"UserWhereUniqueInput\",\"kind\":\"object\",\"isList\":false}]}],\"isRequired\":false,\"isNullable\":true,\"outputType\":{\"type\":\"User\",\"kind\":\"object\",\"isList\":false}}]},{\"name\":\"Mutation\",\"fields\":[{\"name\":\"createOneUser\",\"args\":[{\"name\":\"data\",\"isRequired\":true,\"isNullable\":false,\"inputTypes\":[{\"type\":\"UserCreateInput\",\"kind\":\"object\",\"isList\":false}]}],\"isRequired\":true,\"isNullable\":false,\"outputType\":{\"type\":\"User\",\"kind\":\"object\",\"isList\":false}},{\"name\":\"deleteOneUser\",\"args\":[{\"name\":\"where\",\"isRequired\":true,\"isNullable\":false,\"inputTypes\":[{\"type\":\"UserWhereUniqueInput\",\"kind\":\"object\",\"isList\":false}]}],\"isRequired\":false,\"isNullable\":true,\"outputType\":{\"type\":\"User\",\"kind\":\"object\",\"isList\":false}},{\"name\":\"updateOneUser\",\"args\":[{\"name\":\"data\",\"isRequired\":true,\"isNullable\":false,\"inputTypes\":[{\"type\":\"UserUpdateInput\",\"kind\":\"object\",\"isList\":false}]},{\"name\":\"where\",\"isRequired\":true,\"isNullable\":false,\"inputTypes\":[{\"type\":\"UserWhereUniqueInput\",\"kind\":\"object\",\"isList\":false}]}],\"isRequired\":false,\"isNullable\":true,\"outputType\":{\"type\":\"User\",\"kind\":\"object\",\"isList\":false}},{\"name\":\"upsertOneUser\",\"args\":[{\"name\":\"where\",\"isRequired\":true,\"isNullable\":false,\"inputTypes\":[{\"type\":\"UserWhereUniqueInput\",\"kind\":\"object\",\"isList\":false}]},{\"name\":\"create\",\"isRequired\":true,\"isNullable\":false,\"inputTypes\":[{\"type\":\"UserCreateInput\",\"kind\":\"object\",\"isList\":false}]},{\"name\":\"update\",\"isRequired\":true,\"isNullable\":false,\"inputTypes\":[{\"type\":\"UserUpdateInput\",\"kind\":\"object\",\"isList\":false}]}],\"isRequired\":true,\"isNullable\":false,\"outputType\":{\"type\":\"User\",\"kind\":\"object\",\"isList\":false}},{\"name\":\"updateManyUser\",\"args\":[{\"name\":\"data\",\"isRequired\":true,\"isNullable\":false,\"inputTypes\":[{\"type\":\"UserUpdateManyMutationInput\",\"kind\":\"object\",\"isList\":false}]},{\"name\":\"where\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"UserWhereInput\",\"kind\":\"object\",\"isList\":false}]}],\"isRequired\":true,\"isNullable\":false,\"outputType\":{\"type\":\"BatchPayload\",\"kind\":\"object\",\"isList\":false}},{\"name\":\"deleteManyUser\",\"args\":[{\"name\":\"where\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"UserWhereInput\",\"kind\":\"object\",\"isList\":false}]}],\"isRequired\":true,\"isNullable\":false,\"outputType\":{\"type\":\"BatchPayload\",\"kind\":\"object\",\"isList\":false}},{\"name\":\"executeRaw\",\"args\":[{\"name\":\"query\",\"isRequired\":true,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"parameters\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"Json\",\"kind\":\"scalar\",\"isList\":false}]}],\"isRequired\":true,\"isNullable\":false,\"outputType\":{\"type\":\"Json\",\"kind\":\"scalar\",\"isList\":false}},{\"name\":\"queryRaw\",\"args\":[{\"name\":\"query\",\"isRequired\":true,\"isNullable\":false,\"inputTypes\":[{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}]},{\"name\":\"parameters\",\"isRequired\":false,\"isNullable\":false,\"inputTypes\":[{\"type\":\"Json\",\"kind\":\"scalar\",\"isList\":false}]}],\"isRequired\":true,\"isNullable\":false,\"outputType\":{\"type\":\"Json\",\"kind\":\"scalar\",\"isList\":false}}]},{\"name\":\"User\",\"fields\":[{\"name\":\"id\",\"args\":[],\"isRequired\":true,\"isNullable\":false,\"outputType\":{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}},{\"name\":\"createdAt\",\"args\":[],\"isRequired\":true,\"isNullable\":false,\"outputType\":{\"type\":\"DateTime\",\"kind\":\"scalar\",\"isList\":false}},{\"name\":\"email\",\"args\":[],\"isRequired\":true,\"isNullable\":false,\"outputType\":{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}},{\"name\":\"firstName\",\"args\":[],\"isRequired\":false,\"isNullable\":true,\"outputType\":{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}},{\"name\":\"lastName\",\"args\":[],\"isRequired\":false,\"isNullable\":true,\"outputType\":{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}},{\"name\":\"password\",\"args\":[],\"isRequired\":true,\"isNullable\":false,\"outputType\":{\"type\":\"String\",\"kind\":\"scalar\",\"isList\":false}},{\"name\":\"roles\",\"args\":[],\"isRequired\":false,\"isNullable\":true,\"outputType\":{\"type\":\"Role\",\"kind\":\"enum\",\"isList\":true}}]},{\"name\":\"AggregateUser\",\"fields\":[{\"name\":\"count\",\"args\":[],\"isRequired\":true,\"isNullable\":false,\"outputType\":{\"type\":\"Int\",\"kind\":\"scalar\",\"isList\":false}}]},{\"name\":\"BatchPayload\",\"fields\":[{\"name\":\"count\",\"args\":[],\"isRequired\":true,\"isNullable\":false,\"outputType\":{\"type\":\"Int\",\"kind\":\"scalar\",\"isList\":false}}]}],\"enums\":[{\"name\":\"UserDistinctFieldEnum\",\"values\":[\"id\",\"createdAt\",\"email\",\"firstName\",\"lastName\",\"password\",\"roles\"]},{\"name\":\"SortOrder\",\"values\":[\"asc\",\"desc\"]},{\"name\":\"Role\",\"values\":[\"Registered\",\"Admin\"]},{\"name\":\"QueryMode\",\"values\":[\"default\",\"insensitive\"]}]},\"mappings\":[{\"model\":\"User\",\"plural\":\"users\",\"findOne\":\"findOneUser\",\"findFirst\":\"findFirstUser\",\"findMany\":\"findManyUser\",\"create\":\"createOneUser\",\"delete\":\"deleteOneUser\",\"update\":\"updateOneUser\",\"deleteMany\":\"deleteManyUser\",\"updateMany\":\"updateManyUser\",\"upsert\":\"upsertOneUser\",\"aggregate\":\"aggregateUser\"}]}"

// We are parsing 2 times, as we want independent objects, because
// DMMFClass introduces circular references in the dmmf object
const dmmf = JSON.parse(dmmfString)
exports.dmmf = JSON.parse(dmmfString)

/**
 * Create the Client
 */

const config = {
  "generator": {
    "name": "client",
    "provider": "prisma-client-js",
    "output": "C:\\a\\Work\\zen\\node_modules\\@prisma\\client",
    "binaryTargets": [
      "native",
      "linux-musl"
    ],
    "previewFeatures": [
      "atomicNumberOperations"
    ],
    "config": {}
  },
  "sqliteDatasourceOverrides": [],
  "relativePath": "..\\..\\..\\prisma",
  "clientVersion": "2.8.0",
  "engineVersion": "e6c9b4b2b7fa162d0d459d1863321f547498fcfe"
}
config.document = dmmf
config.dirname = __dirname

const PrismaClient = getPrismaClient(config)
exports.PrismaClient = PrismaClient
AhmedElywa commented 4 years ago

@ZenSoftware yes I know this error already and working on a fix now

AhmedElywa commented 4 years ago

@ZenSoftware please try now

ZenSoftware commented 4 years ago

@AhmedElywa Works perfectly now. Thanks again!