From 97ce6a87d778cee768d051203b0d4a0134ef3906 Mon Sep 17 00:00:00 2001 From: Raffaele Izzia Date: Mon, 24 Aug 2020 17:38:37 +0200 Subject: [PATCH 1/6] fix: Use a different strategy to identify related resource inputs --- packages/dataprovider/src/buildVariables.ts | 37 +++++++++++++++------ 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/packages/dataprovider/src/buildVariables.ts b/packages/dataprovider/src/buildVariables.ts index 5271fa1..4e3197b 100644 --- a/packages/dataprovider/src/buildVariables.ts +++ b/packages/dataprovider/src/buildVariables.ts @@ -7,6 +7,8 @@ import { IntrospectionNonNullTypeRef, } from "graphql"; import isEqual from "lodash/isEqual"; +import isEmpty from "lodash/isEmpty"; +import omit from "lodash/omit"; import isNil from "lodash/isNil"; import isObject from "lodash/isObject"; import { @@ -29,6 +31,18 @@ export interface GetListParams { sort: { field: string; order: string }; } +enum ModifiersParams { + connect = "connect", + create = "create", + delete = "delete", + deleteMany = "deleteMany", + disconnect = "disconnect", + set = "set", + update = "update", + updateMany = "updateMany", + upsert = "upsert", +} + const buildOrderBy = ( introspectionResults: IntrospectionResult, resource: Resource, @@ -182,20 +196,23 @@ const buildNewInputValue = ( (t) => t.name === fieldObjectType.name, ) as IntrospectionInputObjectType; - // if it has a set modifier, it is an update array - const createModifier = fullFieldObjectType?.inputFields.find( - (i) => i.name === "create", - ); - const connectModifier = fullFieldObjectType?.inputFields.find( - (i) => i.name === "connect", - ); + const isRelationship = fullFieldObjectType?.inputFields.every((i) => { + return Object.keys(ModifiersParams).includes(i.name); + }); + const setModifier = fullFieldObjectType?.inputFields.find( - (i) => i.name === "set", + (i) => i.name === ModifiersParams.set, ); + // is it a relation? - if (createModifier && connectModifier) { + if (isRelationship) { + // if it has a set modifier, it is an update array + const createModifier = fullFieldObjectType?.inputFields.find( + (i) => i.name === ModifiersParams.create, + ); + const updateModifier = fullFieldObjectType?.inputFields.find( - (i) => i.name === "update", + (i) => i.name === ModifiersParams.update, ); if (createModifier.type.kind === "LIST") { if (Array.isArray(fieldData)) { From 5968b1b56fb4866b3ce843d2c80f85ac2467d0f7 Mon Sep 17 00:00:00 2001 From: Raffaele Izzia Date: Mon, 24 Aug 2020 17:41:00 +0200 Subject: [PATCH 2/6] refactoring: Remove useless loadsh import --- packages/dataprovider/src/buildVariables.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/dataprovider/src/buildVariables.ts b/packages/dataprovider/src/buildVariables.ts index 4e3197b..65dea2a 100644 --- a/packages/dataprovider/src/buildVariables.ts +++ b/packages/dataprovider/src/buildVariables.ts @@ -7,8 +7,6 @@ import { IntrospectionNonNullTypeRef, } from "graphql"; import isEqual from "lodash/isEqual"; -import isEmpty from "lodash/isEmpty"; -import omit from "lodash/omit"; import isNil from "lodash/isNil"; import isObject from "lodash/isObject"; import { From c5b01dede09a4c7ae498350391bfc485b1fee106 Mon Sep 17 00:00:00 2001 From: Raffaele Izzia Date: Tue, 25 Aug 2020 11:49:37 +0200 Subject: [PATCH 3/6] Add test case for #33 and improve support for conditional modifiers --- .../dataprovider/src/buildGqlQuery.test.ts | 21 ++++++++++ .../dataprovider/src/buildVariables.test.ts | 29 ++++++++++++++ packages/dataprovider/src/buildVariables.ts | 33 ++++++++++++---- .../dataprovider/test-data/datamodel.prisma | 21 +++++++--- packages/dataprovider/test-data/testSchema.ts | 39 ++++++++++++++++++- 5 files changed, 130 insertions(+), 13 deletions(-) diff --git a/packages/dataprovider/src/buildGqlQuery.test.ts b/packages/dataprovider/src/buildGqlQuery.test.ts index 7464635..d78afe7 100644 --- a/packages/dataprovider/src/buildGqlQuery.test.ts +++ b/packages/dataprovider/src/buildGqlQuery.test.ts @@ -230,6 +230,9 @@ describe("buildGqlQuery", () => { blogPosts { id } + comments { + id + } } total: usersCount(where: $where) } @@ -299,6 +302,9 @@ describe("buildGqlQuery", () => { blogPosts { id } + comments { + id + } } total: usersCount(where: $where) } @@ -338,6 +344,9 @@ describe("buildGqlQuery", () => { blogPosts { id } + comments { + id + } } total: usersCount(where: $where) } @@ -378,6 +387,9 @@ describe("buildGqlQuery", () => { blogPosts { id } + comments { + id + } } } `, @@ -419,6 +431,9 @@ describe("buildGqlQuery", () => { blogPosts { id } + comments { + id + } } } `, @@ -457,6 +472,9 @@ describe("buildGqlQuery", () => { blogPosts { id } + comments { + id + } } } `, @@ -524,6 +542,9 @@ describe("buildGqlQuery", () => { blogPosts { id } + comments { + id + } } total: adminUsersCount(where: $where) } diff --git a/packages/dataprovider/src/buildVariables.test.ts b/packages/dataprovider/src/buildVariables.test.ts index 3cbe854..fb79186 100644 --- a/packages/dataprovider/src/buildVariables.test.ts +++ b/packages/dataprovider/src/buildVariables.test.ts @@ -15,11 +15,16 @@ import { getTestIntrospection } from "./testUtils/getTestIntrospection"; describe("buildVariables", () => { let testIntrospection: IntrospectionResult; let testUserResource: Resource; + let testBlogPostCommentResource: Resource; + beforeAll(async () => { testIntrospection = await getTestIntrospection(); testUserResource = testIntrospection.resources.find( (r) => r.type.kind === "OBJECT" && r.type.name === "User", ); + testBlogPostCommentResource = testIntrospection.resources.find( + (r) => r.type.kind === "OBJECT" && r.type.name === "BlogPostComment", + ); }); describe("GET_LIST", () => { @@ -308,6 +313,30 @@ describe("buildVariables", () => { }, }); }); + + it("create a new entity and connect an already existing related connect-only entity", () => { + const params = { + data: { + text: "The body of the comment", + post: { id: "postId" }, + author: { id: "userId" }, + }, + }; + + expect( + buildVariables(testIntrospection)( + testBlogPostCommentResource, + CREATE, + params, + ), + ).toEqual({ + data: { + text: "The body of the comment", + post: { connect: { id: "postId" } }, + author: { connect: { id: "userId" } }, + }, + }); + }); }); describe("UPDATE", () => { diff --git a/packages/dataprovider/src/buildVariables.ts b/packages/dataprovider/src/buildVariables.ts index 65dea2a..031b4bc 100644 --- a/packages/dataprovider/src/buildVariables.ts +++ b/packages/dataprovider/src/buildVariables.ts @@ -22,6 +22,7 @@ import { IntrospectionResult, Resource } from "./constants/interfaces"; import { buildWhere } from "./buildWhere"; import exhaust from "./utils/exhaust"; import getFinalType from "./utils/getFinalType"; +import { disconnect } from "process"; export interface GetListParams { filter: { [key: string]: any }; @@ -212,7 +213,16 @@ const buildNewInputValue = ( const updateModifier = fullFieldObjectType?.inputFields.find( (i) => i.name === ModifiersParams.update, ); - if (createModifier.type.kind === "LIST") { + + const connectModifier = fullFieldObjectType?.inputFields.find( + (i) => i.name === ModifiersParams.connect, + ); + + const disconnectModifier = fullFieldObjectType?.inputFields.find( + (i) => i.name === ModifiersParams.disconnect, + ); + + if (createModifier?.type.kind === "LIST") { if (Array.isArray(fieldData)) { const createListInputType = getCreateInputDataTypeForList( createModifier, @@ -315,7 +325,7 @@ const buildNewInputValue = ( } return inputs; }, []); - if (disconnect.length) { + if (disconnect.length && disconnectModifier) { variables.disconnect = disconnect; } } @@ -325,12 +335,18 @@ const buildNewInputValue = ( } } else { if (!fieldData) { - return { - disconnect: true, - }; + return !disconnectModifier + ? undefined + : { + disconnect: true, + }; } + if (isObject(fieldData)) { if (!isObjectWithId(fieldData)) { + if (!createModifier) { + return; + } // TODO: we assume ".id" to be the id const createObjectModifierType = getFinalType( createModifier.type, @@ -350,6 +366,9 @@ const buildNewInputValue = ( return { create: data }; } else { if (previousFieldData?.id === fieldData.id) { + if (!updateModifier) { + return; + } const updateObjectModifierType = getFinalType( updateModifier.type, ); @@ -368,11 +387,11 @@ const buildNewInputValue = ( introspectionResults, ); return { update: data }; - } else { + } else if (connectModifier) { return { connect: { id: fieldData.id } }; } } - } else { + } else if (connectModifier) { return { connect: { id: fieldData } }; } } diff --git a/packages/dataprovider/test-data/datamodel.prisma b/packages/dataprovider/test-data/datamodel.prisma index 3827093..e91b541 100644 --- a/packages/dataprovider/test-data/datamodel.prisma +++ b/packages/dataprovider/test-data/datamodel.prisma @@ -22,10 +22,20 @@ model UserSocialMedia { } model BlogPost { - id String @default(uuid()) @id + id String @default(uuid()) @id title String text String - author User? @relation(fields: [authorId], references: [id]) + author User? @relation(fields: [authorId], references: [id]) + authorId String? + comments BlogPostComment[] +} + +model BlogPostComment { + id String @default(uuid()) @id + text String + post BlogPost? @relation(fields: [postId], references: [id]) + postId String? + author User? @relation(fields: [authorId], references: [id]) authorId String? } @@ -36,9 +46,9 @@ enum Gender { } model User { - id String @default(uuid()) @id - email String @unique - roles UserRole[] @relation(references: [id]) + id String @default(uuid()) @id + email String @unique + roles UserRole[] @relation(references: [id]) firstName String? lastName String? gender Gender? @@ -46,6 +56,7 @@ model User { wantsNewsletter Boolean userSocialMedia UserSocialMedia? blogPosts BlogPost[] + comments BlogPostComment[] } model SomePublicRecordWithIntId { diff --git a/packages/dataprovider/test-data/testSchema.ts b/packages/dataprovider/test-data/testSchema.ts index b32f2dd..b38f29a 100644 --- a/packages/dataprovider/test-data/testSchema.ts +++ b/packages/dataprovider/test-data/testSchema.ts @@ -1,4 +1,9 @@ -import { makeSchema, objectType, stringArg } from "@nexus/schema"; +import { + makeSchema, + objectType, + stringArg, + inputObjectType, +} from "@nexus/schema"; import { nexusPrismaPlugin } from "nexus-prisma"; import { join } from "path"; import { addCrudResolvers } from "../../backend/src"; @@ -24,6 +29,8 @@ export const testSchema = (options: Options) => { t.model.wantsNewsletter(); t.model.userSocialMedia(null); t.model.blogPosts(null); + t.model.comments(null); + // add one field that needs arguments and therefore can't be used by react-admin t.list.field("logs", { type: "String", @@ -34,6 +41,7 @@ export const testSchema = (options: Options) => { }); }, }); + const UserRole = objectType({ name: "UserRole", definition(t) { @@ -67,6 +75,31 @@ export const testSchema = (options: Options) => { t.model.title(); t.model.text(); t.model.author(); + t.model.comments(); + }, + }); + + const BlogPostComment = objectType({ + name: "BlogPostComment", + definition(t) { + t.model.id(); + t.model.text(); + t.model.post(); + t.model.author(); + }, + }); + + /** + * A simple way to have a "connect-only" related input type. + * This is a simple hack until the nexus-plugin-prisma + * capabilities settings will be ready + * + * @see https://github.com/graphql-nexus/nexus-plugin-prisma/issues/598#issuecomment-614259385 + */ + const UserCreateOneWithoutCommentsInput = inputObjectType({ + name: "UserCreateOneWithoutCommentsInput", + definition(t) { + t.field("connect", { type: "UserWhereUniqueInput" }); }, }); @@ -76,12 +109,16 @@ export const testSchema = (options: Options) => { UserSocialMedia, SomePublicRecordWithIntId, BlogPost, + BlogPostComment, + UserCreateOneWithoutCommentsInput, addCrudResolvers("User", options), addCrudResolvers("UserRole", options), addCrudResolvers("SomePublicRecordWithIntId", options), addCrudResolvers("BlogPost", options), + addCrudResolvers("BlogPostComment", options), ]; + return makeSchema({ types, plugins: [ From 63abd00ad6082198cd216f63b74c3b95e334ebcf Mon Sep 17 00:00:00 2001 From: Raffaele Izzia Date: Tue, 25 Aug 2020 13:49:38 +0200 Subject: [PATCH 4/6] fix: Issue with array of enum --- packages/dataprovider/src/buildVariables.ts | 34 ++++++++++++--------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/packages/dataprovider/src/buildVariables.ts b/packages/dataprovider/src/buildVariables.ts index 031b4bc..e606a27 100644 --- a/packages/dataprovider/src/buildVariables.ts +++ b/packages/dataprovider/src/buildVariables.ts @@ -195,14 +195,26 @@ const buildNewInputValue = ( (t) => t.name === fieldObjectType.name, ) as IntrospectionInputObjectType; - const isRelationship = fullFieldObjectType?.inputFields.every((i) => { - return Object.keys(ModifiersParams).includes(i.name); - }); - const setModifier = fullFieldObjectType?.inputFields.find( (i) => i.name === ModifiersParams.set, ); + const connectModifier = fullFieldObjectType?.inputFields.find( + (i) => i.name === ModifiersParams.connect, + ); + + const disconnectModifier = fullFieldObjectType?.inputFields.find( + (i) => i.name === ModifiersParams.disconnect, + ); + + if (setModifier && !connectModifier && !disconnectModifier) { + return { set: fieldData }; + } + + const isRelationship = fullFieldObjectType?.inputFields.every((i) => { + return Object.keys(ModifiersParams).includes(i.name); + }); + // is it a relation? if (isRelationship) { // if it has a set modifier, it is an update array @@ -214,15 +226,11 @@ const buildNewInputValue = ( (i) => i.name === ModifiersParams.update, ); - const connectModifier = fullFieldObjectType?.inputFields.find( - (i) => i.name === ModifiersParams.connect, - ); - - const disconnectModifier = fullFieldObjectType?.inputFields.find( - (i) => i.name === ModifiersParams.disconnect, - ); + const isList = fullFieldObjectType?.inputFields.some((i) => { + return i.type.kind === "LIST"; + }); - if (createModifier?.type.kind === "LIST") { + if (isList) { if (Array.isArray(fieldData)) { const createListInputType = getCreateInputDataTypeForList( createModifier, @@ -395,8 +403,6 @@ const buildNewInputValue = ( return { connect: { id: fieldData } }; } } - } else if (setModifier) { - return { set: fieldData }; } return; } From 9d9bb0d8058517c8edd6379c9ee97ce9b0850aa4 Mon Sep 17 00:00:00 2001 From: Raffaele Izzia Date: Tue, 25 Aug 2020 14:08:40 +0200 Subject: [PATCH 5/6] test: create/update entity with array of enum --- .../dataprovider/src/buildGqlQuery.test.ts | 7 +++ .../dataprovider/src/buildVariables.test.ts | 49 +++++++++++++++++++ .../dataprovider/test-data/datamodel.prisma | 7 +++ packages/dataprovider/test-data/testSchema.ts | 1 + 4 files changed, 64 insertions(+) diff --git a/packages/dataprovider/src/buildGqlQuery.test.ts b/packages/dataprovider/src/buildGqlQuery.test.ts index d78afe7..555d9bd 100644 --- a/packages/dataprovider/src/buildGqlQuery.test.ts +++ b/packages/dataprovider/src/buildGqlQuery.test.ts @@ -233,6 +233,7 @@ describe("buildGqlQuery", () => { comments { id } + interests } total: usersCount(where: $where) } @@ -305,6 +306,7 @@ describe("buildGqlQuery", () => { comments { id } + interests } total: usersCount(where: $where) } @@ -347,6 +349,7 @@ describe("buildGqlQuery", () => { comments { id } + interests } total: usersCount(where: $where) } @@ -390,6 +393,7 @@ describe("buildGqlQuery", () => { comments { id } + interests } } `, @@ -434,6 +438,7 @@ describe("buildGqlQuery", () => { comments { id } + interests } } `, @@ -475,6 +480,7 @@ describe("buildGqlQuery", () => { comments { id } + interests } } `, @@ -545,6 +551,7 @@ describe("buildGqlQuery", () => { comments { id } + interests } total: adminUsersCount(where: $where) } diff --git a/packages/dataprovider/src/buildVariables.test.ts b/packages/dataprovider/src/buildVariables.test.ts index fb79186..e446cec 100644 --- a/packages/dataprovider/src/buildVariables.test.ts +++ b/packages/dataprovider/src/buildVariables.test.ts @@ -337,6 +337,32 @@ describe("buildVariables", () => { }, }); }); + + it("create a new entity with an array of enum", () => { + const params = { + data: { + email: "albert.einstein@patentamt-bern.ch", + firstName: "Albert", + lastName: "Einstein", + wantsNewsletter: true, + interests: ["TOPIC_ONE", "TOPIC_TWO"], + }, + }; + + expect( + buildVariables(testIntrospection)(testUserResource, CREATE, params), + ).toEqual({ + data: { + email: "albert.einstein@patentamt-bern.ch", + firstName: "Albert", + lastName: "Einstein", + wantsNewsletter: true, + interests: { + set: ["TOPIC_ONE", "TOPIC_TWO"], + }, + }, + }); + }); }); describe("UPDATE", () => { @@ -630,6 +656,29 @@ describe("buildVariables", () => { }, }); }); + + it("update an entity with an array of enum", () => { + const params = { + data: { + id: "einstein", + interests: ["TOPIC_THREE"], + }, + previousData: { + interests: ["TOPIC_ONE", "TOPIC_TWO"], + }, + }; + + expect( + buildVariables(testIntrospection)(testUserResource, UPDATE, params), + ).toEqual({ + where: { id: "einstein" }, + data: { + interests: { + set: ["TOPIC_THREE"], + }, + }, + }); + }); }); describe("GET_ONE", () => { diff --git a/packages/dataprovider/test-data/datamodel.prisma b/packages/dataprovider/test-data/datamodel.prisma index e91b541..2874128 100644 --- a/packages/dataprovider/test-data/datamodel.prisma +++ b/packages/dataprovider/test-data/datamodel.prisma @@ -54,6 +54,7 @@ model User { gender Gender? yearOfBirth Int? wantsNewsletter Boolean + interests Topic[] userSocialMedia UserSocialMedia? blogPosts BlogPost[] comments BlogPostComment[] @@ -63,3 +64,9 @@ model SomePublicRecordWithIntId { id Int @default(autoincrement()) @id title String } + +enum Topic { + TOPIC_ONE + TOPIC_TWO + TOPIC_THREE +} diff --git a/packages/dataprovider/test-data/testSchema.ts b/packages/dataprovider/test-data/testSchema.ts index b38f29a..863df79 100644 --- a/packages/dataprovider/test-data/testSchema.ts +++ b/packages/dataprovider/test-data/testSchema.ts @@ -30,6 +30,7 @@ export const testSchema = (options: Options) => { t.model.userSocialMedia(null); t.model.blogPosts(null); t.model.comments(null); + t.model.interests(); // add one field that needs arguments and therefore can't be used by react-admin t.list.field("logs", { From 08a597793e8e385784b9a79ca93dd79ab88baf02 Mon Sep 17 00:00:00 2001 From: Raffaele Izzia Date: Tue, 25 Aug 2020 14:11:08 +0200 Subject: [PATCH 6/6] fix: Add generated artifacts --- .../dataprovider/generated/nexus-prisma.ts | 43 ++- packages/dataprovider/generated/nexus.ts | 339 +++++++++++++++++- .../dataprovider/generated/schema.graphql | 282 +++++++++++++++ 3 files changed, 657 insertions(+), 7 deletions(-) diff --git a/packages/dataprovider/generated/nexus-prisma.ts b/packages/dataprovider/generated/nexus-prisma.ts index dd00562..6b22a0b 100644 --- a/packages/dataprovider/generated/nexus-prisma.ts +++ b/packages/dataprovider/generated/nexus-prisma.ts @@ -252,6 +252,7 @@ interface ModelTypes { UserRole: prisma.UserRole UserSocialMedia: prisma.UserSocialMedia BlogPost: prisma.BlogPost + BlogPostComment: prisma.BlogPostComment User: prisma.User SomePublicRecordWithIntId: prisma.SomePublicRecordWithIntId } @@ -267,11 +268,15 @@ interface NexusPrismaInputs { ordering: 'id' | 'instagram' | 'twitter' | 'userId' } blogPosts: { - filtering: 'id' | 'title' | 'text' | 'authorId' | 'AND' | 'OR' | 'NOT' | 'author' + filtering: 'id' | 'title' | 'text' | 'authorId' | 'comments' | 'AND' | 'OR' | 'NOT' | 'author' ordering: 'id' | 'title' | 'text' | 'authorId' +} + blogPostComments: { + filtering: 'id' | 'text' | 'postId' | 'authorId' | 'AND' | 'OR' | 'NOT' | 'post' | 'author' + ordering: 'id' | 'text' | 'postId' | 'authorId' } users: { - filtering: 'id' | 'email' | 'roles' | 'firstName' | 'lastName' | 'gender' | 'yearOfBirth' | 'wantsNewsletter' | 'blogPosts' | 'AND' | 'OR' | 'NOT' | 'userSocialMedia' + filtering: 'id' | 'email' | 'roles' | 'firstName' | 'lastName' | 'gender' | 'yearOfBirth' | 'wantsNewsletter' | 'blogPosts' | 'comments' | 'AND' | 'OR' | 'NOT' | 'userSocialMedia' ordering: 'id' | 'email' | 'firstName' | 'lastName' | 'gender' | 'yearOfBirth' | 'wantsNewsletter' } somePublicRecordWithIntIds: { @@ -282,7 +287,7 @@ interface NexusPrismaInputs { }, UserRole: { users: { - filtering: 'id' | 'email' | 'roles' | 'firstName' | 'lastName' | 'gender' | 'yearOfBirth' | 'wantsNewsletter' | 'blogPosts' | 'AND' | 'OR' | 'NOT' | 'userSocialMedia' + filtering: 'id' | 'email' | 'roles' | 'firstName' | 'lastName' | 'gender' | 'yearOfBirth' | 'wantsNewsletter' | 'blogPosts' | 'comments' | 'AND' | 'OR' | 'NOT' | 'userSocialMedia' ordering: 'id' | 'email' | 'firstName' | 'lastName' | 'gender' | 'yearOfBirth' | 'wantsNewsletter' } @@ -290,6 +295,12 @@ interface NexusPrismaInputs { }, BlogPost: { + comments: { + filtering: 'id' | 'text' | 'postId' | 'authorId' | 'AND' | 'OR' | 'NOT' | 'post' | 'author' + ordering: 'id' | 'text' | 'postId' | 'authorId' +} + + }, BlogPostComment: { }, User: { @@ -298,9 +309,13 @@ interface NexusPrismaInputs { ordering: 'id' | 'name' } blogPosts: { - filtering: 'id' | 'title' | 'text' | 'authorId' | 'AND' | 'OR' | 'NOT' | 'author' + filtering: 'id' | 'title' | 'text' | 'authorId' | 'comments' | 'AND' | 'OR' | 'NOT' | 'author' ordering: 'id' | 'title' | 'text' | 'authorId' } + comments: { + filtering: 'id' | 'text' | 'postId' | 'authorId' | 'AND' | 'OR' | 'NOT' | 'post' | 'author' + ordering: 'id' | 'text' | 'postId' | 'authorId' +} }, SomePublicRecordWithIntId: { @@ -316,6 +331,8 @@ interface NexusPrismaTypes { userSocialMedias: 'UserSocialMedia' blogPost: 'BlogPost' blogPosts: 'BlogPost' + blogPostComment: 'BlogPostComment' + blogPostComments: 'BlogPostComment' user: 'User' users: 'User' somePublicRecordWithIntId: 'SomePublicRecordWithIntId' @@ -341,6 +358,12 @@ interface NexusPrismaTypes { deleteOneBlogPost: 'BlogPost' deleteManyBlogPost: 'BatchPayload' upsertOneBlogPost: 'BlogPost' + createOneBlogPostComment: 'BlogPostComment' + updateOneBlogPostComment: 'BlogPostComment' + updateManyBlogPostComment: 'BatchPayload' + deleteOneBlogPostComment: 'BlogPostComment' + deleteManyBlogPostComment: 'BatchPayload' + upsertOneBlogPostComment: 'BlogPostComment' createOneUser: 'User' updateOneUser: 'User' updateManyUser: 'BatchPayload' @@ -373,6 +396,15 @@ interface NexusPrismaTypes { text: 'String' author: 'User' authorId: 'String' + comments: 'BlogPostComment' + +}, BlogPostComment: { + id: 'String' + text: 'String' + post: 'BlogPost' + postId: 'String' + author: 'User' + authorId: 'String' }, User: { id: 'String' @@ -383,8 +415,10 @@ interface NexusPrismaTypes { gender: 'Gender' yearOfBirth: 'Int' wantsNewsletter: 'Boolean' + interests: 'Topic' userSocialMedia: 'UserSocialMedia' blogPosts: 'BlogPost' + comments: 'BlogPostComment' }, SomePublicRecordWithIntId: { id: 'Int' @@ -397,6 +431,7 @@ interface NexusPrismaMethods { UserRole: NexusPrismaFields<'UserRole'> UserSocialMedia: NexusPrismaFields<'UserSocialMedia'> BlogPost: NexusPrismaFields<'BlogPost'> + BlogPostComment: NexusPrismaFields<'BlogPostComment'> User: NexusPrismaFields<'User'> SomePublicRecordWithIntId: NexusPrismaFields<'SomePublicRecordWithIntId'> Query: NexusPrismaFields<'Query'> diff --git a/packages/dataprovider/generated/nexus.ts b/packages/dataprovider/generated/nexus.ts index 2589baf..b7f6946 100644 --- a/packages/dataprovider/generated/nexus.ts +++ b/packages/dataprovider/generated/nexus.ts @@ -19,8 +19,135 @@ declare global { } export interface NexusGenInputs { + BlogPostCommentCreateInput: { // input type + author?: NexusGenInputs['UserCreateOneWithoutCommentsInput'] | null; // UserCreateOneWithoutCommentsInput + id?: string | null; // String + post?: NexusGenInputs['BlogPostCreateOneWithoutCommentsInput'] | null; // BlogPostCreateOneWithoutCommentsInput + text: string; // String! + } + BlogPostCommentCreateManyWithoutAuthorInput: { // input type + connect?: NexusGenInputs['BlogPostCommentWhereUniqueInput'][] | null; // [BlogPostCommentWhereUniqueInput!] + create?: NexusGenInputs['BlogPostCommentCreateWithoutAuthorInput'][] | null; // [BlogPostCommentCreateWithoutAuthorInput!] + } + BlogPostCommentCreateManyWithoutPostInput: { // input type + connect?: NexusGenInputs['BlogPostCommentWhereUniqueInput'][] | null; // [BlogPostCommentWhereUniqueInput!] + create?: NexusGenInputs['BlogPostCommentCreateWithoutPostInput'][] | null; // [BlogPostCommentCreateWithoutPostInput!] + } + BlogPostCommentCreateWithoutAuthorInput: { // input type + id?: string | null; // String + post?: NexusGenInputs['BlogPostCreateOneWithoutCommentsInput'] | null; // BlogPostCreateOneWithoutCommentsInput + text: string; // String! + } + BlogPostCommentCreateWithoutPostInput: { // input type + author?: NexusGenInputs['UserCreateOneWithoutCommentsInput'] | null; // UserCreateOneWithoutCommentsInput + id?: string | null; // String + text: string; // String! + } + BlogPostCommentFilter: { // input type + every?: NexusGenInputs['BlogPostCommentWhereInput'] | null; // BlogPostCommentWhereInput + none?: NexusGenInputs['BlogPostCommentWhereInput'] | null; // BlogPostCommentWhereInput + some?: NexusGenInputs['BlogPostCommentWhereInput'] | null; // BlogPostCommentWhereInput + } + BlogPostCommentOrderByInput: { // input type + authorId?: NexusGenEnums['OrderByArg'] | null; // OrderByArg + id?: NexusGenEnums['OrderByArg'] | null; // OrderByArg + postId?: NexusGenEnums['OrderByArg'] | null; // OrderByArg + text?: NexusGenEnums['OrderByArg'] | null; // OrderByArg + } + BlogPostCommentScalarWhereInput: { // input type + AND?: NexusGenInputs['BlogPostCommentScalarWhereInput'][] | null; // [BlogPostCommentScalarWhereInput!] + authorId?: NexusGenInputs['NullableStringFilter'] | null; // NullableStringFilter + id?: NexusGenInputs['UUIDFilter'] | null; // UUIDFilter + NOT?: NexusGenInputs['BlogPostCommentScalarWhereInput'][] | null; // [BlogPostCommentScalarWhereInput!] + OR?: NexusGenInputs['BlogPostCommentScalarWhereInput'][] | null; // [BlogPostCommentScalarWhereInput!] + postId?: NexusGenInputs['NullableStringFilter'] | null; // NullableStringFilter + text?: NexusGenInputs['StringFilter'] | null; // StringFilter + } + BlogPostCommentUpdateInput: { // input type + author?: NexusGenInputs['UserUpdateOneWithoutCommentsInput'] | null; // UserUpdateOneWithoutCommentsInput + id?: string | null; // String + post?: NexusGenInputs['BlogPostUpdateOneWithoutCommentsInput'] | null; // BlogPostUpdateOneWithoutCommentsInput + text?: string | null; // String + } + BlogPostCommentUpdateManyDataInput: { // input type + id?: string | null; // String + text?: string | null; // String + } + BlogPostCommentUpdateManyMutationInput: { // input type + id?: string | null; // String + text?: string | null; // String + } + BlogPostCommentUpdateManyWithWhereNestedInput: { // input type + data: NexusGenInputs['BlogPostCommentUpdateManyDataInput']; // BlogPostCommentUpdateManyDataInput! + where: NexusGenInputs['BlogPostCommentScalarWhereInput']; // BlogPostCommentScalarWhereInput! + } + BlogPostCommentUpdateManyWithoutAuthorInput: { // input type + connect?: NexusGenInputs['BlogPostCommentWhereUniqueInput'][] | null; // [BlogPostCommentWhereUniqueInput!] + create?: NexusGenInputs['BlogPostCommentCreateWithoutAuthorInput'][] | null; // [BlogPostCommentCreateWithoutAuthorInput!] + delete?: NexusGenInputs['BlogPostCommentWhereUniqueInput'][] | null; // [BlogPostCommentWhereUniqueInput!] + deleteMany?: NexusGenInputs['BlogPostCommentScalarWhereInput'][] | null; // [BlogPostCommentScalarWhereInput!] + disconnect?: NexusGenInputs['BlogPostCommentWhereUniqueInput'][] | null; // [BlogPostCommentWhereUniqueInput!] + set?: NexusGenInputs['BlogPostCommentWhereUniqueInput'][] | null; // [BlogPostCommentWhereUniqueInput!] + update?: NexusGenInputs['BlogPostCommentUpdateWithWhereUniqueWithoutAuthorInput'][] | null; // [BlogPostCommentUpdateWithWhereUniqueWithoutAuthorInput!] + updateMany?: NexusGenInputs['BlogPostCommentUpdateManyWithWhereNestedInput'][] | null; // [BlogPostCommentUpdateManyWithWhereNestedInput!] + upsert?: NexusGenInputs['BlogPostCommentUpsertWithWhereUniqueWithoutAuthorInput'][] | null; // [BlogPostCommentUpsertWithWhereUniqueWithoutAuthorInput!] + } + BlogPostCommentUpdateManyWithoutPostInput: { // input type + connect?: NexusGenInputs['BlogPostCommentWhereUniqueInput'][] | null; // [BlogPostCommentWhereUniqueInput!] + create?: NexusGenInputs['BlogPostCommentCreateWithoutPostInput'][] | null; // [BlogPostCommentCreateWithoutPostInput!] + delete?: NexusGenInputs['BlogPostCommentWhereUniqueInput'][] | null; // [BlogPostCommentWhereUniqueInput!] + deleteMany?: NexusGenInputs['BlogPostCommentScalarWhereInput'][] | null; // [BlogPostCommentScalarWhereInput!] + disconnect?: NexusGenInputs['BlogPostCommentWhereUniqueInput'][] | null; // [BlogPostCommentWhereUniqueInput!] + set?: NexusGenInputs['BlogPostCommentWhereUniqueInput'][] | null; // [BlogPostCommentWhereUniqueInput!] + update?: NexusGenInputs['BlogPostCommentUpdateWithWhereUniqueWithoutPostInput'][] | null; // [BlogPostCommentUpdateWithWhereUniqueWithoutPostInput!] + updateMany?: NexusGenInputs['BlogPostCommentUpdateManyWithWhereNestedInput'][] | null; // [BlogPostCommentUpdateManyWithWhereNestedInput!] + upsert?: NexusGenInputs['BlogPostCommentUpsertWithWhereUniqueWithoutPostInput'][] | null; // [BlogPostCommentUpsertWithWhereUniqueWithoutPostInput!] + } + BlogPostCommentUpdateWithWhereUniqueWithoutAuthorInput: { // input type + data: NexusGenInputs['BlogPostCommentUpdateWithoutAuthorDataInput']; // BlogPostCommentUpdateWithoutAuthorDataInput! + where: NexusGenInputs['BlogPostCommentWhereUniqueInput']; // BlogPostCommentWhereUniqueInput! + } + BlogPostCommentUpdateWithWhereUniqueWithoutPostInput: { // input type + data: NexusGenInputs['BlogPostCommentUpdateWithoutPostDataInput']; // BlogPostCommentUpdateWithoutPostDataInput! + where: NexusGenInputs['BlogPostCommentWhereUniqueInput']; // BlogPostCommentWhereUniqueInput! + } + BlogPostCommentUpdateWithoutAuthorDataInput: { // input type + id?: string | null; // String + post?: NexusGenInputs['BlogPostUpdateOneWithoutCommentsInput'] | null; // BlogPostUpdateOneWithoutCommentsInput + text?: string | null; // String + } + BlogPostCommentUpdateWithoutPostDataInput: { // input type + author?: NexusGenInputs['UserUpdateOneWithoutCommentsInput'] | null; // UserUpdateOneWithoutCommentsInput + id?: string | null; // String + text?: string | null; // String + } + BlogPostCommentUpsertWithWhereUniqueWithoutAuthorInput: { // input type + create: NexusGenInputs['BlogPostCommentCreateWithoutAuthorInput']; // BlogPostCommentCreateWithoutAuthorInput! + update: NexusGenInputs['BlogPostCommentUpdateWithoutAuthorDataInput']; // BlogPostCommentUpdateWithoutAuthorDataInput! + where: NexusGenInputs['BlogPostCommentWhereUniqueInput']; // BlogPostCommentWhereUniqueInput! + } + BlogPostCommentUpsertWithWhereUniqueWithoutPostInput: { // input type + create: NexusGenInputs['BlogPostCommentCreateWithoutPostInput']; // BlogPostCommentCreateWithoutPostInput! + update: NexusGenInputs['BlogPostCommentUpdateWithoutPostDataInput']; // BlogPostCommentUpdateWithoutPostDataInput! + where: NexusGenInputs['BlogPostCommentWhereUniqueInput']; // BlogPostCommentWhereUniqueInput! + } + BlogPostCommentWhereInput: { // input type + AND?: NexusGenInputs['BlogPostCommentWhereInput'][] | null; // [BlogPostCommentWhereInput!] + author?: NexusGenInputs['UserWhereInput'] | null; // UserWhereInput + authorId?: NexusGenInputs['NullableStringFilter'] | null; // NullableStringFilter + id?: NexusGenInputs['UUIDFilter'] | null; // UUIDFilter + NOT?: NexusGenInputs['BlogPostCommentWhereInput'][] | null; // [BlogPostCommentWhereInput!] + OR?: NexusGenInputs['BlogPostCommentWhereInput'][] | null; // [BlogPostCommentWhereInput!] + post?: NexusGenInputs['BlogPostWhereInput'] | null; // BlogPostWhereInput + postId?: NexusGenInputs['NullableStringFilter'] | null; // NullableStringFilter + text?: NexusGenInputs['StringFilter'] | null; // StringFilter + } + BlogPostCommentWhereUniqueInput: { // input type + id?: string | null; // String + } BlogPostCreateInput: { // input type author?: NexusGenInputs['UserCreateOneWithoutBlogPostsInput'] | null; // UserCreateOneWithoutBlogPostsInput + comments?: NexusGenInputs['BlogPostCommentCreateManyWithoutPostInput'] | null; // BlogPostCommentCreateManyWithoutPostInput id?: string | null; // String text: string; // String! title: string; // String! @@ -29,7 +156,18 @@ export interface NexusGenInputs { connect?: NexusGenInputs['BlogPostWhereUniqueInput'][] | null; // [BlogPostWhereUniqueInput!] create?: NexusGenInputs['BlogPostCreateWithoutAuthorInput'][] | null; // [BlogPostCreateWithoutAuthorInput!] } + BlogPostCreateOneWithoutCommentsInput: { // input type + connect?: NexusGenInputs['BlogPostWhereUniqueInput'] | null; // BlogPostWhereUniqueInput + create?: NexusGenInputs['BlogPostCreateWithoutCommentsInput'] | null; // BlogPostCreateWithoutCommentsInput + } BlogPostCreateWithoutAuthorInput: { // input type + comments?: NexusGenInputs['BlogPostCommentCreateManyWithoutPostInput'] | null; // BlogPostCommentCreateManyWithoutPostInput + id?: string | null; // String + text: string; // String! + title: string; // String! + } + BlogPostCreateWithoutCommentsInput: { // input type + author?: NexusGenInputs['UserCreateOneWithoutBlogPostsInput'] | null; // UserCreateOneWithoutBlogPostsInput id?: string | null; // String text: string; // String! title: string; // String! @@ -48,6 +186,7 @@ export interface NexusGenInputs { BlogPostScalarWhereInput: { // input type AND?: NexusGenInputs['BlogPostScalarWhereInput'][] | null; // [BlogPostScalarWhereInput!] authorId?: NexusGenInputs['NullableStringFilter'] | null; // NullableStringFilter + comments?: NexusGenInputs['BlogPostCommentFilter'] | null; // BlogPostCommentFilter id?: NexusGenInputs['UUIDFilter'] | null; // UUIDFilter NOT?: NexusGenInputs['BlogPostScalarWhereInput'][] | null; // [BlogPostScalarWhereInput!] OR?: NexusGenInputs['BlogPostScalarWhereInput'][] | null; // [BlogPostScalarWhereInput!] @@ -56,6 +195,7 @@ export interface NexusGenInputs { } BlogPostUpdateInput: { // input type author?: NexusGenInputs['UserUpdateOneWithoutBlogPostsInput'] | null; // UserUpdateOneWithoutBlogPostsInput + comments?: NexusGenInputs['BlogPostCommentUpdateManyWithoutPostInput'] | null; // BlogPostCommentUpdateManyWithoutPostInput id?: string | null; // String text?: string | null; // String title?: string | null; // String @@ -85,11 +225,26 @@ export interface NexusGenInputs { updateMany?: NexusGenInputs['BlogPostUpdateManyWithWhereNestedInput'][] | null; // [BlogPostUpdateManyWithWhereNestedInput!] upsert?: NexusGenInputs['BlogPostUpsertWithWhereUniqueWithoutAuthorInput'][] | null; // [BlogPostUpsertWithWhereUniqueWithoutAuthorInput!] } + BlogPostUpdateOneWithoutCommentsInput: { // input type + connect?: NexusGenInputs['BlogPostWhereUniqueInput'] | null; // BlogPostWhereUniqueInput + create?: NexusGenInputs['BlogPostCreateWithoutCommentsInput'] | null; // BlogPostCreateWithoutCommentsInput + delete?: boolean | null; // Boolean + disconnect?: boolean | null; // Boolean + update?: NexusGenInputs['BlogPostUpdateWithoutCommentsDataInput'] | null; // BlogPostUpdateWithoutCommentsDataInput + upsert?: NexusGenInputs['BlogPostUpsertWithoutCommentsInput'] | null; // BlogPostUpsertWithoutCommentsInput + } BlogPostUpdateWithWhereUniqueWithoutAuthorInput: { // input type data: NexusGenInputs['BlogPostUpdateWithoutAuthorDataInput']; // BlogPostUpdateWithoutAuthorDataInput! where: NexusGenInputs['BlogPostWhereUniqueInput']; // BlogPostWhereUniqueInput! } BlogPostUpdateWithoutAuthorDataInput: { // input type + comments?: NexusGenInputs['BlogPostCommentUpdateManyWithoutPostInput'] | null; // BlogPostCommentUpdateManyWithoutPostInput + id?: string | null; // String + text?: string | null; // String + title?: string | null; // String + } + BlogPostUpdateWithoutCommentsDataInput: { // input type + author?: NexusGenInputs['UserUpdateOneWithoutBlogPostsInput'] | null; // UserUpdateOneWithoutBlogPostsInput id?: string | null; // String text?: string | null; // String title?: string | null; // String @@ -99,10 +254,15 @@ export interface NexusGenInputs { update: NexusGenInputs['BlogPostUpdateWithoutAuthorDataInput']; // BlogPostUpdateWithoutAuthorDataInput! where: NexusGenInputs['BlogPostWhereUniqueInput']; // BlogPostWhereUniqueInput! } + BlogPostUpsertWithoutCommentsInput: { // input type + create: NexusGenInputs['BlogPostCreateWithoutCommentsInput']; // BlogPostCreateWithoutCommentsInput! + update: NexusGenInputs['BlogPostUpdateWithoutCommentsDataInput']; // BlogPostUpdateWithoutCommentsDataInput! + } BlogPostWhereInput: { // input type AND?: NexusGenInputs['BlogPostWhereInput'][] | null; // [BlogPostWhereInput!] author?: NexusGenInputs['UserWhereInput'] | null; // UserWhereInput authorId?: NexusGenInputs['NullableStringFilter'] | null; // NullableStringFilter + comments?: NexusGenInputs['BlogPostCommentFilter'] | null; // BlogPostCommentFilter id?: NexusGenInputs['UUIDFilter'] | null; // UUIDFilter NOT?: NexusGenInputs['BlogPostWhereInput'][] | null; // [BlogPostWhereInput!] OR?: NexusGenInputs['BlogPostWhereInput'][] | null; // [BlogPostWhereInput!] @@ -202,10 +362,12 @@ export interface NexusGenInputs { } UserCreateInput: { // input type blogPosts?: NexusGenInputs['BlogPostCreateManyWithoutAuthorInput'] | null; // BlogPostCreateManyWithoutAuthorInput + comments?: NexusGenInputs['BlogPostCommentCreateManyWithoutAuthorInput'] | null; // BlogPostCommentCreateManyWithoutAuthorInput email: string; // String! firstName?: string | null; // String gender?: NexusGenEnums['Gender'] | null; // Gender id?: string | null; // String + interests?: NexusGenInputs['UserCreateinterestsInput'] | null; // UserCreateinterestsInput lastName?: string | null; // String roles?: NexusGenInputs['UserRoleCreateManyWithoutUsersInput'] | null; // UserRoleCreateManyWithoutUsersInput userSocialMedia?: NexusGenInputs['UserSocialMediaCreateOneWithoutUserInput'] | null; // UserSocialMediaCreateOneWithoutUserInput @@ -220,11 +382,29 @@ export interface NexusGenInputs { connect?: NexusGenInputs['UserWhereUniqueInput'] | null; // UserWhereUniqueInput create?: NexusGenInputs['UserCreateWithoutBlogPostsInput'] | null; // UserCreateWithoutBlogPostsInput } + UserCreateOneWithoutCommentsInput: { // input type + connect?: NexusGenInputs['UserWhereUniqueInput'] | null; // UserWhereUniqueInput + } UserCreateWithoutBlogPostsInput: { // input type + comments?: NexusGenInputs['BlogPostCommentCreateManyWithoutAuthorInput'] | null; // BlogPostCommentCreateManyWithoutAuthorInput email: string; // String! firstName?: string | null; // String gender?: NexusGenEnums['Gender'] | null; // Gender id?: string | null; // String + interests?: NexusGenInputs['UserCreateinterestsInput'] | null; // UserCreateinterestsInput + lastName?: string | null; // String + roles?: NexusGenInputs['UserRoleCreateManyWithoutUsersInput'] | null; // UserRoleCreateManyWithoutUsersInput + userSocialMedia?: NexusGenInputs['UserSocialMediaCreateOneWithoutUserInput'] | null; // UserSocialMediaCreateOneWithoutUserInput + wantsNewsletter: boolean; // Boolean! + yearOfBirth?: number | null; // Int + } + UserCreateWithoutCommentsInput: { // input type + blogPosts?: NexusGenInputs['BlogPostCreateManyWithoutAuthorInput'] | null; // BlogPostCreateManyWithoutAuthorInput + email: string; // String! + firstName?: string | null; // String + gender?: NexusGenEnums['Gender'] | null; // Gender + id?: string | null; // String + interests?: NexusGenInputs['UserCreateinterestsInput'] | null; // UserCreateinterestsInput lastName?: string | null; // String roles?: NexusGenInputs['UserRoleCreateManyWithoutUsersInput'] | null; // UserRoleCreateManyWithoutUsersInput userSocialMedia?: NexusGenInputs['UserSocialMediaCreateOneWithoutUserInput'] | null; // UserSocialMediaCreateOneWithoutUserInput @@ -233,15 +413,20 @@ export interface NexusGenInputs { } UserCreateWithoutRolesInput: { // input type blogPosts?: NexusGenInputs['BlogPostCreateManyWithoutAuthorInput'] | null; // BlogPostCreateManyWithoutAuthorInput + comments?: NexusGenInputs['BlogPostCommentCreateManyWithoutAuthorInput'] | null; // BlogPostCommentCreateManyWithoutAuthorInput email: string; // String! firstName?: string | null; // String gender?: NexusGenEnums['Gender'] | null; // Gender id?: string | null; // String + interests?: NexusGenInputs['UserCreateinterestsInput'] | null; // UserCreateinterestsInput lastName?: string | null; // String userSocialMedia?: NexusGenInputs['UserSocialMediaCreateOneWithoutUserInput'] | null; // UserSocialMediaCreateOneWithoutUserInput wantsNewsletter: boolean; // Boolean! yearOfBirth?: number | null; // Int } + UserCreateinterestsInput: { // input type + set?: NexusGenEnums['Topic'][] | null; // [Topic!] + } UserFilter: { // input type every?: NexusGenInputs['UserWhereInput'] | null; // UserWhereInput none?: NexusGenInputs['UserWhereInput'] | null; // UserWhereInput @@ -341,6 +526,7 @@ export interface NexusGenInputs { UserScalarWhereInput: { // input type AND?: NexusGenInputs['UserScalarWhereInput'][] | null; // [UserScalarWhereInput!] blogPosts?: NexusGenInputs['BlogPostFilter'] | null; // BlogPostFilter + comments?: NexusGenInputs['BlogPostCommentFilter'] | null; // BlogPostCommentFilter email?: NexusGenInputs['StringFilter'] | null; // StringFilter firstName?: NexusGenInputs['NullableStringFilter'] | null; // NullableStringFilter gender?: NexusGenEnums['Gender'] | null; // Gender @@ -393,10 +579,12 @@ export interface NexusGenInputs { } UserUpdateInput: { // input type blogPosts?: NexusGenInputs['BlogPostUpdateManyWithoutAuthorInput'] | null; // BlogPostUpdateManyWithoutAuthorInput + comments?: NexusGenInputs['BlogPostCommentUpdateManyWithoutAuthorInput'] | null; // BlogPostCommentUpdateManyWithoutAuthorInput email?: string | null; // String firstName?: string | null; // String gender?: NexusGenEnums['Gender'] | null; // Gender id?: string | null; // String + interests?: NexusGenInputs['UserUpdateinterestsInput'] | null; // UserUpdateinterestsInput lastName?: string | null; // String roles?: NexusGenInputs['UserRoleUpdateManyWithoutUsersInput'] | null; // UserRoleUpdateManyWithoutUsersInput userSocialMedia?: NexusGenInputs['UserSocialMediaUpdateOneWithoutUserInput'] | null; // UserSocialMediaUpdateOneWithoutUserInput @@ -408,6 +596,7 @@ export interface NexusGenInputs { firstName?: string | null; // String gender?: NexusGenEnums['Gender'] | null; // Gender id?: string | null; // String + interests?: NexusGenInputs['UserUpdateinterestsInput'] | null; // UserUpdateinterestsInput lastName?: string | null; // String wantsNewsletter?: boolean | null; // Boolean yearOfBirth?: number | null; // Int @@ -417,6 +606,7 @@ export interface NexusGenInputs { firstName?: string | null; // String gender?: NexusGenEnums['Gender'] | null; // Gender id?: string | null; // String + interests?: NexusGenInputs['UserUpdateinterestsInput'] | null; // UserUpdateinterestsInput lastName?: string | null; // String wantsNewsletter?: boolean | null; // Boolean yearOfBirth?: number | null; // Int @@ -444,15 +634,38 @@ export interface NexusGenInputs { update?: NexusGenInputs['UserUpdateWithoutBlogPostsDataInput'] | null; // UserUpdateWithoutBlogPostsDataInput upsert?: NexusGenInputs['UserUpsertWithoutBlogPostsInput'] | null; // UserUpsertWithoutBlogPostsInput } + UserUpdateOneWithoutCommentsInput: { // input type + connect?: NexusGenInputs['UserWhereUniqueInput'] | null; // UserWhereUniqueInput + create?: NexusGenInputs['UserCreateWithoutCommentsInput'] | null; // UserCreateWithoutCommentsInput + delete?: boolean | null; // Boolean + disconnect?: boolean | null; // Boolean + update?: NexusGenInputs['UserUpdateWithoutCommentsDataInput'] | null; // UserUpdateWithoutCommentsDataInput + upsert?: NexusGenInputs['UserUpsertWithoutCommentsInput'] | null; // UserUpsertWithoutCommentsInput + } UserUpdateWithWhereUniqueWithoutRolesInput: { // input type data: NexusGenInputs['UserUpdateWithoutRolesDataInput']; // UserUpdateWithoutRolesDataInput! where: NexusGenInputs['UserWhereUniqueInput']; // UserWhereUniqueInput! } UserUpdateWithoutBlogPostsDataInput: { // input type + comments?: NexusGenInputs['BlogPostCommentUpdateManyWithoutAuthorInput'] | null; // BlogPostCommentUpdateManyWithoutAuthorInput + email?: string | null; // String + firstName?: string | null; // String + gender?: NexusGenEnums['Gender'] | null; // Gender + id?: string | null; // String + interests?: NexusGenInputs['UserUpdateinterestsInput'] | null; // UserUpdateinterestsInput + lastName?: string | null; // String + roles?: NexusGenInputs['UserRoleUpdateManyWithoutUsersInput'] | null; // UserRoleUpdateManyWithoutUsersInput + userSocialMedia?: NexusGenInputs['UserSocialMediaUpdateOneWithoutUserInput'] | null; // UserSocialMediaUpdateOneWithoutUserInput + wantsNewsletter?: boolean | null; // Boolean + yearOfBirth?: number | null; // Int + } + UserUpdateWithoutCommentsDataInput: { // input type + blogPosts?: NexusGenInputs['BlogPostUpdateManyWithoutAuthorInput'] | null; // BlogPostUpdateManyWithoutAuthorInput email?: string | null; // String firstName?: string | null; // String gender?: NexusGenEnums['Gender'] | null; // Gender id?: string | null; // String + interests?: NexusGenInputs['UserUpdateinterestsInput'] | null; // UserUpdateinterestsInput lastName?: string | null; // String roles?: NexusGenInputs['UserRoleUpdateManyWithoutUsersInput'] | null; // UserRoleUpdateManyWithoutUsersInput userSocialMedia?: NexusGenInputs['UserSocialMediaUpdateOneWithoutUserInput'] | null; // UserSocialMediaUpdateOneWithoutUserInput @@ -461,15 +674,20 @@ export interface NexusGenInputs { } UserUpdateWithoutRolesDataInput: { // input type blogPosts?: NexusGenInputs['BlogPostUpdateManyWithoutAuthorInput'] | null; // BlogPostUpdateManyWithoutAuthorInput + comments?: NexusGenInputs['BlogPostCommentUpdateManyWithoutAuthorInput'] | null; // BlogPostCommentUpdateManyWithoutAuthorInput email?: string | null; // String firstName?: string | null; // String gender?: NexusGenEnums['Gender'] | null; // Gender id?: string | null; // String + interests?: NexusGenInputs['UserUpdateinterestsInput'] | null; // UserUpdateinterestsInput lastName?: string | null; // String userSocialMedia?: NexusGenInputs['UserSocialMediaUpdateOneWithoutUserInput'] | null; // UserSocialMediaUpdateOneWithoutUserInput wantsNewsletter?: boolean | null; // Boolean yearOfBirth?: number | null; // Int } + UserUpdateinterestsInput: { // input type + set?: NexusGenEnums['Topic'][] | null; // [Topic!] + } UserUpsertWithWhereUniqueWithoutRolesInput: { // input type create: NexusGenInputs['UserCreateWithoutRolesInput']; // UserCreateWithoutRolesInput! update: NexusGenInputs['UserUpdateWithoutRolesDataInput']; // UserUpdateWithoutRolesDataInput! @@ -479,9 +697,14 @@ export interface NexusGenInputs { create: NexusGenInputs['UserCreateWithoutBlogPostsInput']; // UserCreateWithoutBlogPostsInput! update: NexusGenInputs['UserUpdateWithoutBlogPostsDataInput']; // UserUpdateWithoutBlogPostsDataInput! } + UserUpsertWithoutCommentsInput: { // input type + create: NexusGenInputs['UserCreateWithoutCommentsInput']; // UserCreateWithoutCommentsInput! + update: NexusGenInputs['UserUpdateWithoutCommentsDataInput']; // UserUpdateWithoutCommentsDataInput! + } UserWhereInput: { // input type AND?: NexusGenInputs['UserWhereInput'][] | null; // [UserWhereInput!] blogPosts?: NexusGenInputs['BlogPostFilter'] | null; // BlogPostFilter + comments?: NexusGenInputs['BlogPostCommentFilter'] | null; // BlogPostCommentFilter email?: NexusGenInputs['StringFilter'] | null; // StringFilter firstName?: NexusGenInputs['NullableStringFilter'] | null; // NullableStringFilter gender?: NexusGenEnums['Gender'] | null; // Gender @@ -503,6 +726,7 @@ export interface NexusGenInputs { export interface NexusGenEnums { Gender: "FEMALE" | "MALE" | "OTHER" OrderByArg: "asc" | "desc" + Topic: "TOPIC_ONE" | "TOPIC_THREE" | "TOPIC_TWO" } export interface NexusGenRootTypes { @@ -514,6 +738,10 @@ export interface NexusGenRootTypes { text: string; // String! title: string; // String! } + BlogPostComment: { // root type + id: string; // String! + text: string; // String! + } Mutation: {}; Query: {}; SomePublicRecordWithIntId: { // root type @@ -525,6 +753,7 @@ export interface NexusGenRootTypes { firstName?: string | null; // String gender?: NexusGenEnums['Gender'] | null; // Gender id: string; // String! + interests: NexusGenEnums['Topic'][]; // [Topic!]! lastName?: string | null; // String logs: string[]; // [String!]! wantsNewsletter: boolean; // Boolean! @@ -548,9 +777,33 @@ export interface NexusGenRootTypes { } export interface NexusGenAllTypes extends NexusGenRootTypes { + BlogPostCommentCreateInput: NexusGenInputs['BlogPostCommentCreateInput']; + BlogPostCommentCreateManyWithoutAuthorInput: NexusGenInputs['BlogPostCommentCreateManyWithoutAuthorInput']; + BlogPostCommentCreateManyWithoutPostInput: NexusGenInputs['BlogPostCommentCreateManyWithoutPostInput']; + BlogPostCommentCreateWithoutAuthorInput: NexusGenInputs['BlogPostCommentCreateWithoutAuthorInput']; + BlogPostCommentCreateWithoutPostInput: NexusGenInputs['BlogPostCommentCreateWithoutPostInput']; + BlogPostCommentFilter: NexusGenInputs['BlogPostCommentFilter']; + BlogPostCommentOrderByInput: NexusGenInputs['BlogPostCommentOrderByInput']; + BlogPostCommentScalarWhereInput: NexusGenInputs['BlogPostCommentScalarWhereInput']; + BlogPostCommentUpdateInput: NexusGenInputs['BlogPostCommentUpdateInput']; + BlogPostCommentUpdateManyDataInput: NexusGenInputs['BlogPostCommentUpdateManyDataInput']; + BlogPostCommentUpdateManyMutationInput: NexusGenInputs['BlogPostCommentUpdateManyMutationInput']; + BlogPostCommentUpdateManyWithWhereNestedInput: NexusGenInputs['BlogPostCommentUpdateManyWithWhereNestedInput']; + BlogPostCommentUpdateManyWithoutAuthorInput: NexusGenInputs['BlogPostCommentUpdateManyWithoutAuthorInput']; + BlogPostCommentUpdateManyWithoutPostInput: NexusGenInputs['BlogPostCommentUpdateManyWithoutPostInput']; + BlogPostCommentUpdateWithWhereUniqueWithoutAuthorInput: NexusGenInputs['BlogPostCommentUpdateWithWhereUniqueWithoutAuthorInput']; + BlogPostCommentUpdateWithWhereUniqueWithoutPostInput: NexusGenInputs['BlogPostCommentUpdateWithWhereUniqueWithoutPostInput']; + BlogPostCommentUpdateWithoutAuthorDataInput: NexusGenInputs['BlogPostCommentUpdateWithoutAuthorDataInput']; + BlogPostCommentUpdateWithoutPostDataInput: NexusGenInputs['BlogPostCommentUpdateWithoutPostDataInput']; + BlogPostCommentUpsertWithWhereUniqueWithoutAuthorInput: NexusGenInputs['BlogPostCommentUpsertWithWhereUniqueWithoutAuthorInput']; + BlogPostCommentUpsertWithWhereUniqueWithoutPostInput: NexusGenInputs['BlogPostCommentUpsertWithWhereUniqueWithoutPostInput']; + BlogPostCommentWhereInput: NexusGenInputs['BlogPostCommentWhereInput']; + BlogPostCommentWhereUniqueInput: NexusGenInputs['BlogPostCommentWhereUniqueInput']; BlogPostCreateInput: NexusGenInputs['BlogPostCreateInput']; BlogPostCreateManyWithoutAuthorInput: NexusGenInputs['BlogPostCreateManyWithoutAuthorInput']; + BlogPostCreateOneWithoutCommentsInput: NexusGenInputs['BlogPostCreateOneWithoutCommentsInput']; BlogPostCreateWithoutAuthorInput: NexusGenInputs['BlogPostCreateWithoutAuthorInput']; + BlogPostCreateWithoutCommentsInput: NexusGenInputs['BlogPostCreateWithoutCommentsInput']; BlogPostFilter: NexusGenInputs['BlogPostFilter']; BlogPostOrderByInput: NexusGenInputs['BlogPostOrderByInput']; BlogPostScalarWhereInput: NexusGenInputs['BlogPostScalarWhereInput']; @@ -559,9 +812,12 @@ export interface NexusGenAllTypes extends NexusGenRootTypes { BlogPostUpdateManyMutationInput: NexusGenInputs['BlogPostUpdateManyMutationInput']; BlogPostUpdateManyWithWhereNestedInput: NexusGenInputs['BlogPostUpdateManyWithWhereNestedInput']; BlogPostUpdateManyWithoutAuthorInput: NexusGenInputs['BlogPostUpdateManyWithoutAuthorInput']; + BlogPostUpdateOneWithoutCommentsInput: NexusGenInputs['BlogPostUpdateOneWithoutCommentsInput']; BlogPostUpdateWithWhereUniqueWithoutAuthorInput: NexusGenInputs['BlogPostUpdateWithWhereUniqueWithoutAuthorInput']; BlogPostUpdateWithoutAuthorDataInput: NexusGenInputs['BlogPostUpdateWithoutAuthorDataInput']; + BlogPostUpdateWithoutCommentsDataInput: NexusGenInputs['BlogPostUpdateWithoutCommentsDataInput']; BlogPostUpsertWithWhereUniqueWithoutAuthorInput: NexusGenInputs['BlogPostUpsertWithWhereUniqueWithoutAuthorInput']; + BlogPostUpsertWithoutCommentsInput: NexusGenInputs['BlogPostUpsertWithoutCommentsInput']; BlogPostWhereInput: NexusGenInputs['BlogPostWhereInput']; BlogPostWhereUniqueInput: NexusGenInputs['BlogPostWhereUniqueInput']; BooleanFilter: NexusGenInputs['BooleanFilter']; @@ -579,8 +835,11 @@ export interface NexusGenAllTypes extends NexusGenRootTypes { UserCreateInput: NexusGenInputs['UserCreateInput']; UserCreateManyWithoutRolesInput: NexusGenInputs['UserCreateManyWithoutRolesInput']; UserCreateOneWithoutBlogPostsInput: NexusGenInputs['UserCreateOneWithoutBlogPostsInput']; + UserCreateOneWithoutCommentsInput: NexusGenInputs['UserCreateOneWithoutCommentsInput']; UserCreateWithoutBlogPostsInput: NexusGenInputs['UserCreateWithoutBlogPostsInput']; + UserCreateWithoutCommentsInput: NexusGenInputs['UserCreateWithoutCommentsInput']; UserCreateWithoutRolesInput: NexusGenInputs['UserCreateWithoutRolesInput']; + UserCreateinterestsInput: NexusGenInputs['UserCreateinterestsInput']; UserFilter: NexusGenInputs['UserFilter']; UserOrderByInput: NexusGenInputs['UserOrderByInput']; UserRoleCreateInput: NexusGenInputs['UserRoleCreateInput']; @@ -613,15 +872,20 @@ export interface NexusGenAllTypes extends NexusGenRootTypes { UserUpdateManyWithWhereNestedInput: NexusGenInputs['UserUpdateManyWithWhereNestedInput']; UserUpdateManyWithoutRolesInput: NexusGenInputs['UserUpdateManyWithoutRolesInput']; UserUpdateOneWithoutBlogPostsInput: NexusGenInputs['UserUpdateOneWithoutBlogPostsInput']; + UserUpdateOneWithoutCommentsInput: NexusGenInputs['UserUpdateOneWithoutCommentsInput']; UserUpdateWithWhereUniqueWithoutRolesInput: NexusGenInputs['UserUpdateWithWhereUniqueWithoutRolesInput']; UserUpdateWithoutBlogPostsDataInput: NexusGenInputs['UserUpdateWithoutBlogPostsDataInput']; + UserUpdateWithoutCommentsDataInput: NexusGenInputs['UserUpdateWithoutCommentsDataInput']; UserUpdateWithoutRolesDataInput: NexusGenInputs['UserUpdateWithoutRolesDataInput']; + UserUpdateinterestsInput: NexusGenInputs['UserUpdateinterestsInput']; UserUpsertWithWhereUniqueWithoutRolesInput: NexusGenInputs['UserUpsertWithWhereUniqueWithoutRolesInput']; UserUpsertWithoutBlogPostsInput: NexusGenInputs['UserUpsertWithoutBlogPostsInput']; + UserUpsertWithoutCommentsInput: NexusGenInputs['UserUpsertWithoutCommentsInput']; UserWhereInput: NexusGenInputs['UserWhereInput']; UserWhereUniqueInput: NexusGenInputs['UserWhereUniqueInput']; Gender: NexusGenEnums['Gender']; OrderByArg: NexusGenEnums['OrderByArg']; + Topic: NexusGenEnums['Topic']; } export interface NexusGenFieldTypes { @@ -630,38 +894,54 @@ export interface NexusGenFieldTypes { } BlogPost: { // field return type author: NexusGenRootTypes['User'] | null; // User + comments: NexusGenRootTypes['BlogPostComment'][]; // [BlogPostComment!]! id: string; // String! text: string; // String! title: string; // String! } + BlogPostComment: { // field return type + author: NexusGenRootTypes['User'] | null; // User + id: string; // String! + post: NexusGenRootTypes['BlogPost'] | null; // BlogPost + text: string; // String! + } Mutation: { // field return type createOneBlogPost: NexusGenRootTypes['BlogPost']; // BlogPost! + createOneBlogPostComment: NexusGenRootTypes['BlogPostComment']; // BlogPostComment! createOneSomePublicRecordWithIntId: NexusGenRootTypes['SomePublicRecordWithIntId']; // SomePublicRecordWithIntId! createOneUser: NexusGenRootTypes['User']; // User! createOneUserRole: NexusGenRootTypes['UserRole']; // UserRole! deleteManyBlogPost: NexusGenRootTypes['BatchPayload']; // BatchPayload! + deleteManyBlogPostComment: NexusGenRootTypes['BatchPayload']; // BatchPayload! deleteManySomePublicRecordWithIntId: NexusGenRootTypes['BatchPayload']; // BatchPayload! deleteManyUser: NexusGenRootTypes['BatchPayload']; // BatchPayload! deleteManyUserRole: NexusGenRootTypes['BatchPayload']; // BatchPayload! deleteOneBlogPost: NexusGenRootTypes['BlogPost'] | null; // BlogPost + deleteOneBlogPostComment: NexusGenRootTypes['BlogPostComment'] | null; // BlogPostComment deleteOneSomePublicRecordWithIntId: NexusGenRootTypes['SomePublicRecordWithIntId'] | null; // SomePublicRecordWithIntId deleteOneUser: NexusGenRootTypes['User'] | null; // User deleteOneUserRole: NexusGenRootTypes['UserRole'] | null; // UserRole updateManyBlogPost: NexusGenRootTypes['BatchPayload']; // BatchPayload! + updateManyBlogPostComment: NexusGenRootTypes['BatchPayload']; // BatchPayload! updateManySomePublicRecordWithIntId: NexusGenRootTypes['BatchPayload']; // BatchPayload! updateManyUser: NexusGenRootTypes['BatchPayload']; // BatchPayload! updateManyUserRole: NexusGenRootTypes['BatchPayload']; // BatchPayload! updateOneBlogPost: NexusGenRootTypes['BlogPost'] | null; // BlogPost + updateOneBlogPostComment: NexusGenRootTypes['BlogPostComment'] | null; // BlogPostComment updateOneSomePublicRecordWithIntId: NexusGenRootTypes['SomePublicRecordWithIntId'] | null; // SomePublicRecordWithIntId updateOneUser: NexusGenRootTypes['User'] | null; // User updateOneUserRole: NexusGenRootTypes['UserRole'] | null; // UserRole upsertOneBlogPost: NexusGenRootTypes['BlogPost']; // BlogPost! + upsertOneBlogPostComment: NexusGenRootTypes['BlogPostComment']; // BlogPostComment! upsertOneSomePublicRecordWithIntId: NexusGenRootTypes['SomePublicRecordWithIntId']; // SomePublicRecordWithIntId! upsertOneUser: NexusGenRootTypes['User']; // User! upsertOneUserRole: NexusGenRootTypes['UserRole']; // UserRole! } Query: { // field return type blogPost: NexusGenRootTypes['BlogPost'] | null; // BlogPost + blogPostComment: NexusGenRootTypes['BlogPostComment'] | null; // BlogPostComment + blogPostComments: NexusGenRootTypes['BlogPostComment'][]; // [BlogPostComment!]! + blogPostCommentsCount: number; // Int! blogPosts: NexusGenRootTypes['BlogPost'][]; // [BlogPost!]! blogPostsCount: number; // Int! somePublicRecordWithIntId: NexusGenRootTypes['SomePublicRecordWithIntId'] | null; // SomePublicRecordWithIntId @@ -680,10 +960,12 @@ export interface NexusGenFieldTypes { } User: { // field return type blogPosts: NexusGenRootTypes['BlogPost'][]; // [BlogPost!]! + comments: NexusGenRootTypes['BlogPostComment'][]; // [BlogPostComment!]! email: string; // String! firstName: string | null; // String gender: NexusGenEnums['Gender'] | null; // Gender id: string; // String! + interests: NexusGenEnums['Topic'][]; // [Topic!]! lastName: string | null; // String logs: string[]; // [String!]! roles: NexusGenRootTypes['UserRole'][]; // [UserRole!]! @@ -704,10 +986,20 @@ export interface NexusGenFieldTypes { } export interface NexusGenArgTypes { + BlogPost: { + comments: { // args + cursor?: NexusGenInputs['BlogPostCommentWhereUniqueInput'] | null; // BlogPostCommentWhereUniqueInput + skip?: number | null; // Int + take?: number | null; // Int + } + } Mutation: { createOneBlogPost: { // args data: NexusGenInputs['BlogPostCreateInput']; // BlogPostCreateInput! } + createOneBlogPostComment: { // args + data: NexusGenInputs['BlogPostCommentCreateInput']; // BlogPostCommentCreateInput! + } createOneSomePublicRecordWithIntId: { // args data: NexusGenInputs['SomePublicRecordWithIntIdCreateInput']; // SomePublicRecordWithIntIdCreateInput! } @@ -720,6 +1012,9 @@ export interface NexusGenArgTypes { deleteManyBlogPost: { // args where?: NexusGenInputs['BlogPostWhereInput'] | null; // BlogPostWhereInput } + deleteManyBlogPostComment: { // args + where?: NexusGenInputs['BlogPostCommentWhereInput'] | null; // BlogPostCommentWhereInput + } deleteManySomePublicRecordWithIntId: { // args where?: NexusGenInputs['SomePublicRecordWithIntIdWhereInput'] | null; // SomePublicRecordWithIntIdWhereInput } @@ -732,6 +1027,9 @@ export interface NexusGenArgTypes { deleteOneBlogPost: { // args where: NexusGenInputs['BlogPostWhereUniqueInput']; // BlogPostWhereUniqueInput! } + deleteOneBlogPostComment: { // args + where: NexusGenInputs['BlogPostCommentWhereUniqueInput']; // BlogPostCommentWhereUniqueInput! + } deleteOneSomePublicRecordWithIntId: { // args where: NexusGenInputs['SomePublicRecordWithIntIdWhereUniqueInput']; // SomePublicRecordWithIntIdWhereUniqueInput! } @@ -745,6 +1043,10 @@ export interface NexusGenArgTypes { data: NexusGenInputs['BlogPostUpdateManyMutationInput']; // BlogPostUpdateManyMutationInput! where?: NexusGenInputs['BlogPostWhereInput'] | null; // BlogPostWhereInput } + updateManyBlogPostComment: { // args + data: NexusGenInputs['BlogPostCommentUpdateManyMutationInput']; // BlogPostCommentUpdateManyMutationInput! + where?: NexusGenInputs['BlogPostCommentWhereInput'] | null; // BlogPostCommentWhereInput + } updateManySomePublicRecordWithIntId: { // args data: NexusGenInputs['SomePublicRecordWithIntIdUpdateManyMutationInput']; // SomePublicRecordWithIntIdUpdateManyMutationInput! where?: NexusGenInputs['SomePublicRecordWithIntIdWhereInput'] | null; // SomePublicRecordWithIntIdWhereInput @@ -761,6 +1063,10 @@ export interface NexusGenArgTypes { data: NexusGenInputs['BlogPostUpdateInput']; // BlogPostUpdateInput! where: NexusGenInputs['BlogPostWhereUniqueInput']; // BlogPostWhereUniqueInput! } + updateOneBlogPostComment: { // args + data: NexusGenInputs['BlogPostCommentUpdateInput']; // BlogPostCommentUpdateInput! + where: NexusGenInputs['BlogPostCommentWhereUniqueInput']; // BlogPostCommentWhereUniqueInput! + } updateOneSomePublicRecordWithIntId: { // args data: NexusGenInputs['SomePublicRecordWithIntIdUpdateInput']; // SomePublicRecordWithIntIdUpdateInput! where: NexusGenInputs['SomePublicRecordWithIntIdWhereUniqueInput']; // SomePublicRecordWithIntIdWhereUniqueInput! @@ -778,6 +1084,11 @@ export interface NexusGenArgTypes { update: NexusGenInputs['BlogPostUpdateInput']; // BlogPostUpdateInput! where: NexusGenInputs['BlogPostWhereUniqueInput']; // BlogPostWhereUniqueInput! } + upsertOneBlogPostComment: { // args + create: NexusGenInputs['BlogPostCommentCreateInput']; // BlogPostCommentCreateInput! + update: NexusGenInputs['BlogPostCommentUpdateInput']; // BlogPostCommentUpdateInput! + where: NexusGenInputs['BlogPostCommentWhereUniqueInput']; // BlogPostCommentWhereUniqueInput! + } upsertOneSomePublicRecordWithIntId: { // args create: NexusGenInputs['SomePublicRecordWithIntIdCreateInput']; // SomePublicRecordWithIntIdCreateInput! update: NexusGenInputs['SomePublicRecordWithIntIdUpdateInput']; // SomePublicRecordWithIntIdUpdateInput! @@ -798,6 +1109,23 @@ export interface NexusGenArgTypes { blogPost: { // args where: NexusGenInputs['BlogPostWhereUniqueInput']; // BlogPostWhereUniqueInput! } + blogPostComment: { // args + where: NexusGenInputs['BlogPostCommentWhereUniqueInput']; // BlogPostCommentWhereUniqueInput! + } + blogPostComments: { // args + cursor?: NexusGenInputs['BlogPostCommentWhereUniqueInput'] | null; // BlogPostCommentWhereUniqueInput + orderBy?: NexusGenInputs['BlogPostCommentOrderByInput'] | null; // BlogPostCommentOrderByInput + skip?: number | null; // Int + take?: number | null; // Int + where?: NexusGenInputs['BlogPostCommentWhereInput'] | null; // BlogPostCommentWhereInput + } + blogPostCommentsCount: { // args + cursor?: NexusGenInputs['BlogPostCommentWhereUniqueInput'] | null; // BlogPostCommentWhereUniqueInput + orderBy?: NexusGenInputs['BlogPostCommentOrderByInput'] | null; // BlogPostCommentOrderByInput + skip?: number | null; // Int + take?: number | null; // Int + where?: NexusGenInputs['BlogPostCommentWhereInput'] | null; // BlogPostCommentWhereInput + } blogPosts: { // args cursor?: NexusGenInputs['BlogPostWhereUniqueInput'] | null; // BlogPostWhereUniqueInput orderBy?: NexusGenInputs['BlogPostOrderByInput'] | null; // BlogPostOrderByInput @@ -870,6 +1198,11 @@ export interface NexusGenArgTypes { skip?: number | null; // Int take?: number | null; // Int } + comments: { // args + cursor?: NexusGenInputs['BlogPostCommentWhereUniqueInput'] | null; // BlogPostCommentWhereUniqueInput + skip?: number | null; // Int + take?: number | null; // Int + } logs: { // args from: string; // String! to: string; // String! @@ -888,11 +1221,11 @@ export interface NexusGenAbstractResolveReturnTypes { export interface NexusGenInheritedFields {} -export type NexusGenObjectNames = "BatchPayload" | "BlogPost" | "Mutation" | "Query" | "SomePublicRecordWithIntId" | "User" | "UserRole" | "UserSocialMedia"; +export type NexusGenObjectNames = "BatchPayload" | "BlogPost" | "BlogPostComment" | "Mutation" | "Query" | "SomePublicRecordWithIntId" | "User" | "UserRole" | "UserSocialMedia"; -export type NexusGenInputNames = "BlogPostCreateInput" | "BlogPostCreateManyWithoutAuthorInput" | "BlogPostCreateWithoutAuthorInput" | "BlogPostFilter" | "BlogPostOrderByInput" | "BlogPostScalarWhereInput" | "BlogPostUpdateInput" | "BlogPostUpdateManyDataInput" | "BlogPostUpdateManyMutationInput" | "BlogPostUpdateManyWithWhereNestedInput" | "BlogPostUpdateManyWithoutAuthorInput" | "BlogPostUpdateWithWhereUniqueWithoutAuthorInput" | "BlogPostUpdateWithoutAuthorDataInput" | "BlogPostUpsertWithWhereUniqueWithoutAuthorInput" | "BlogPostWhereInput" | "BlogPostWhereUniqueInput" | "BooleanFilter" | "IntFilter" | "NullableIntFilter" | "NullableStringFilter" | "SomePublicRecordWithIntIdCreateInput" | "SomePublicRecordWithIntIdOrderByInput" | "SomePublicRecordWithIntIdUpdateInput" | "SomePublicRecordWithIntIdUpdateManyMutationInput" | "SomePublicRecordWithIntIdWhereInput" | "SomePublicRecordWithIntIdWhereUniqueInput" | "StringFilter" | "UUIDFilter" | "UserCreateInput" | "UserCreateManyWithoutRolesInput" | "UserCreateOneWithoutBlogPostsInput" | "UserCreateWithoutBlogPostsInput" | "UserCreateWithoutRolesInput" | "UserFilter" | "UserOrderByInput" | "UserRoleCreateInput" | "UserRoleCreateManyWithoutUsersInput" | "UserRoleCreateWithoutUsersInput" | "UserRoleFilter" | "UserRoleOrderByInput" | "UserRoleScalarWhereInput" | "UserRoleUpdateInput" | "UserRoleUpdateManyDataInput" | "UserRoleUpdateManyMutationInput" | "UserRoleUpdateManyWithWhereNestedInput" | "UserRoleUpdateManyWithoutUsersInput" | "UserRoleUpdateWithWhereUniqueWithoutUsersInput" | "UserRoleUpdateWithoutUsersDataInput" | "UserRoleUpsertWithWhereUniqueWithoutUsersInput" | "UserRoleWhereInput" | "UserRoleWhereUniqueInput" | "UserScalarWhereInput" | "UserSocialMediaCreateOneWithoutUserInput" | "UserSocialMediaCreateWithoutUserInput" | "UserSocialMediaUpdateOneWithoutUserInput" | "UserSocialMediaUpdateWithoutUserDataInput" | "UserSocialMediaUpsertWithoutUserInput" | "UserSocialMediaWhereInput" | "UserSocialMediaWhereUniqueInput" | "UserUpdateInput" | "UserUpdateManyDataInput" | "UserUpdateManyMutationInput" | "UserUpdateManyWithWhereNestedInput" | "UserUpdateManyWithoutRolesInput" | "UserUpdateOneWithoutBlogPostsInput" | "UserUpdateWithWhereUniqueWithoutRolesInput" | "UserUpdateWithoutBlogPostsDataInput" | "UserUpdateWithoutRolesDataInput" | "UserUpsertWithWhereUniqueWithoutRolesInput" | "UserUpsertWithoutBlogPostsInput" | "UserWhereInput" | "UserWhereUniqueInput"; +export type NexusGenInputNames = "BlogPostCommentCreateInput" | "BlogPostCommentCreateManyWithoutAuthorInput" | "BlogPostCommentCreateManyWithoutPostInput" | "BlogPostCommentCreateWithoutAuthorInput" | "BlogPostCommentCreateWithoutPostInput" | "BlogPostCommentFilter" | "BlogPostCommentOrderByInput" | "BlogPostCommentScalarWhereInput" | "BlogPostCommentUpdateInput" | "BlogPostCommentUpdateManyDataInput" | "BlogPostCommentUpdateManyMutationInput" | "BlogPostCommentUpdateManyWithWhereNestedInput" | "BlogPostCommentUpdateManyWithoutAuthorInput" | "BlogPostCommentUpdateManyWithoutPostInput" | "BlogPostCommentUpdateWithWhereUniqueWithoutAuthorInput" | "BlogPostCommentUpdateWithWhereUniqueWithoutPostInput" | "BlogPostCommentUpdateWithoutAuthorDataInput" | "BlogPostCommentUpdateWithoutPostDataInput" | "BlogPostCommentUpsertWithWhereUniqueWithoutAuthorInput" | "BlogPostCommentUpsertWithWhereUniqueWithoutPostInput" | "BlogPostCommentWhereInput" | "BlogPostCommentWhereUniqueInput" | "BlogPostCreateInput" | "BlogPostCreateManyWithoutAuthorInput" | "BlogPostCreateOneWithoutCommentsInput" | "BlogPostCreateWithoutAuthorInput" | "BlogPostCreateWithoutCommentsInput" | "BlogPostFilter" | "BlogPostOrderByInput" | "BlogPostScalarWhereInput" | "BlogPostUpdateInput" | "BlogPostUpdateManyDataInput" | "BlogPostUpdateManyMutationInput" | "BlogPostUpdateManyWithWhereNestedInput" | "BlogPostUpdateManyWithoutAuthorInput" | "BlogPostUpdateOneWithoutCommentsInput" | "BlogPostUpdateWithWhereUniqueWithoutAuthorInput" | "BlogPostUpdateWithoutAuthorDataInput" | "BlogPostUpdateWithoutCommentsDataInput" | "BlogPostUpsertWithWhereUniqueWithoutAuthorInput" | "BlogPostUpsertWithoutCommentsInput" | "BlogPostWhereInput" | "BlogPostWhereUniqueInput" | "BooleanFilter" | "IntFilter" | "NullableIntFilter" | "NullableStringFilter" | "SomePublicRecordWithIntIdCreateInput" | "SomePublicRecordWithIntIdOrderByInput" | "SomePublicRecordWithIntIdUpdateInput" | "SomePublicRecordWithIntIdUpdateManyMutationInput" | "SomePublicRecordWithIntIdWhereInput" | "SomePublicRecordWithIntIdWhereUniqueInput" | "StringFilter" | "UUIDFilter" | "UserCreateInput" | "UserCreateManyWithoutRolesInput" | "UserCreateOneWithoutBlogPostsInput" | "UserCreateOneWithoutCommentsInput" | "UserCreateWithoutBlogPostsInput" | "UserCreateWithoutCommentsInput" | "UserCreateWithoutRolesInput" | "UserCreateinterestsInput" | "UserFilter" | "UserOrderByInput" | "UserRoleCreateInput" | "UserRoleCreateManyWithoutUsersInput" | "UserRoleCreateWithoutUsersInput" | "UserRoleFilter" | "UserRoleOrderByInput" | "UserRoleScalarWhereInput" | "UserRoleUpdateInput" | "UserRoleUpdateManyDataInput" | "UserRoleUpdateManyMutationInput" | "UserRoleUpdateManyWithWhereNestedInput" | "UserRoleUpdateManyWithoutUsersInput" | "UserRoleUpdateWithWhereUniqueWithoutUsersInput" | "UserRoleUpdateWithoutUsersDataInput" | "UserRoleUpsertWithWhereUniqueWithoutUsersInput" | "UserRoleWhereInput" | "UserRoleWhereUniqueInput" | "UserScalarWhereInput" | "UserSocialMediaCreateOneWithoutUserInput" | "UserSocialMediaCreateWithoutUserInput" | "UserSocialMediaUpdateOneWithoutUserInput" | "UserSocialMediaUpdateWithoutUserDataInput" | "UserSocialMediaUpsertWithoutUserInput" | "UserSocialMediaWhereInput" | "UserSocialMediaWhereUniqueInput" | "UserUpdateInput" | "UserUpdateManyDataInput" | "UserUpdateManyMutationInput" | "UserUpdateManyWithWhereNestedInput" | "UserUpdateManyWithoutRolesInput" | "UserUpdateOneWithoutBlogPostsInput" | "UserUpdateOneWithoutCommentsInput" | "UserUpdateWithWhereUniqueWithoutRolesInput" | "UserUpdateWithoutBlogPostsDataInput" | "UserUpdateWithoutCommentsDataInput" | "UserUpdateWithoutRolesDataInput" | "UserUpdateinterestsInput" | "UserUpsertWithWhereUniqueWithoutRolesInput" | "UserUpsertWithoutBlogPostsInput" | "UserUpsertWithoutCommentsInput" | "UserWhereInput" | "UserWhereUniqueInput"; -export type NexusGenEnumNames = "Gender" | "OrderByArg"; +export type NexusGenEnumNames = "Gender" | "OrderByArg" | "Topic"; export type NexusGenInterfaceNames = never; diff --git a/packages/dataprovider/generated/schema.graphql b/packages/dataprovider/generated/schema.graphql index 441c816..4aa0485 100644 --- a/packages/dataprovider/generated/schema.graphql +++ b/packages/dataprovider/generated/schema.graphql @@ -8,13 +8,170 @@ type BatchPayload { type BlogPost { author: User + comments(cursor: BlogPostCommentWhereUniqueInput, skip: Int, take: Int): [BlogPostComment!]! id: String! text: String! title: String! } +type BlogPostComment { + author: User + id: String! + post: BlogPost + text: String! +} + +input BlogPostCommentCreateInput { + author: UserCreateOneWithoutCommentsInput + id: String + post: BlogPostCreateOneWithoutCommentsInput + text: String! +} + +input BlogPostCommentCreateManyWithoutAuthorInput { + connect: [BlogPostCommentWhereUniqueInput!] + create: [BlogPostCommentCreateWithoutAuthorInput!] +} + +input BlogPostCommentCreateManyWithoutPostInput { + connect: [BlogPostCommentWhereUniqueInput!] + create: [BlogPostCommentCreateWithoutPostInput!] +} + +input BlogPostCommentCreateWithoutAuthorInput { + id: String + post: BlogPostCreateOneWithoutCommentsInput + text: String! +} + +input BlogPostCommentCreateWithoutPostInput { + author: UserCreateOneWithoutCommentsInput + id: String + text: String! +} + +input BlogPostCommentFilter { + every: BlogPostCommentWhereInput + none: BlogPostCommentWhereInput + some: BlogPostCommentWhereInput +} + +input BlogPostCommentOrderByInput { + authorId: OrderByArg + id: OrderByArg + postId: OrderByArg + text: OrderByArg +} + +input BlogPostCommentScalarWhereInput { + AND: [BlogPostCommentScalarWhereInput!] + authorId: NullableStringFilter + id: UUIDFilter + NOT: [BlogPostCommentScalarWhereInput!] + OR: [BlogPostCommentScalarWhereInput!] + postId: NullableStringFilter + text: StringFilter +} + +input BlogPostCommentUpdateInput { + author: UserUpdateOneWithoutCommentsInput + id: String + post: BlogPostUpdateOneWithoutCommentsInput + text: String +} + +input BlogPostCommentUpdateManyDataInput { + id: String + text: String +} + +input BlogPostCommentUpdateManyMutationInput { + id: String + text: String +} + +input BlogPostCommentUpdateManyWithoutAuthorInput { + connect: [BlogPostCommentWhereUniqueInput!] + create: [BlogPostCommentCreateWithoutAuthorInput!] + delete: [BlogPostCommentWhereUniqueInput!] + deleteMany: [BlogPostCommentScalarWhereInput!] + disconnect: [BlogPostCommentWhereUniqueInput!] + set: [BlogPostCommentWhereUniqueInput!] + update: [BlogPostCommentUpdateWithWhereUniqueWithoutAuthorInput!] + updateMany: [BlogPostCommentUpdateManyWithWhereNestedInput!] + upsert: [BlogPostCommentUpsertWithWhereUniqueWithoutAuthorInput!] +} + +input BlogPostCommentUpdateManyWithoutPostInput { + connect: [BlogPostCommentWhereUniqueInput!] + create: [BlogPostCommentCreateWithoutPostInput!] + delete: [BlogPostCommentWhereUniqueInput!] + deleteMany: [BlogPostCommentScalarWhereInput!] + disconnect: [BlogPostCommentWhereUniqueInput!] + set: [BlogPostCommentWhereUniqueInput!] + update: [BlogPostCommentUpdateWithWhereUniqueWithoutPostInput!] + updateMany: [BlogPostCommentUpdateManyWithWhereNestedInput!] + upsert: [BlogPostCommentUpsertWithWhereUniqueWithoutPostInput!] +} + +input BlogPostCommentUpdateManyWithWhereNestedInput { + data: BlogPostCommentUpdateManyDataInput! + where: BlogPostCommentScalarWhereInput! +} + +input BlogPostCommentUpdateWithoutAuthorDataInput { + id: String + post: BlogPostUpdateOneWithoutCommentsInput + text: String +} + +input BlogPostCommentUpdateWithoutPostDataInput { + author: UserUpdateOneWithoutCommentsInput + id: String + text: String +} + +input BlogPostCommentUpdateWithWhereUniqueWithoutAuthorInput { + data: BlogPostCommentUpdateWithoutAuthorDataInput! + where: BlogPostCommentWhereUniqueInput! +} + +input BlogPostCommentUpdateWithWhereUniqueWithoutPostInput { + data: BlogPostCommentUpdateWithoutPostDataInput! + where: BlogPostCommentWhereUniqueInput! +} + +input BlogPostCommentUpsertWithWhereUniqueWithoutAuthorInput { + create: BlogPostCommentCreateWithoutAuthorInput! + update: BlogPostCommentUpdateWithoutAuthorDataInput! + where: BlogPostCommentWhereUniqueInput! +} + +input BlogPostCommentUpsertWithWhereUniqueWithoutPostInput { + create: BlogPostCommentCreateWithoutPostInput! + update: BlogPostCommentUpdateWithoutPostDataInput! + where: BlogPostCommentWhereUniqueInput! +} + +input BlogPostCommentWhereInput { + AND: [BlogPostCommentWhereInput!] + author: UserWhereInput + authorId: NullableStringFilter + id: UUIDFilter + NOT: [BlogPostCommentWhereInput!] + OR: [BlogPostCommentWhereInput!] + post: BlogPostWhereInput + postId: NullableStringFilter + text: StringFilter +} + +input BlogPostCommentWhereUniqueInput { + id: String +} + input BlogPostCreateInput { author: UserCreateOneWithoutBlogPostsInput + comments: BlogPostCommentCreateManyWithoutPostInput id: String text: String! title: String! @@ -25,7 +182,20 @@ input BlogPostCreateManyWithoutAuthorInput { create: [BlogPostCreateWithoutAuthorInput!] } +input BlogPostCreateOneWithoutCommentsInput { + connect: BlogPostWhereUniqueInput + create: BlogPostCreateWithoutCommentsInput +} + input BlogPostCreateWithoutAuthorInput { + comments: BlogPostCommentCreateManyWithoutPostInput + id: String + text: String! + title: String! +} + +input BlogPostCreateWithoutCommentsInput { + author: UserCreateOneWithoutBlogPostsInput id: String text: String! title: String! @@ -47,6 +217,7 @@ input BlogPostOrderByInput { input BlogPostScalarWhereInput { AND: [BlogPostScalarWhereInput!] authorId: NullableStringFilter + comments: BlogPostCommentFilter id: UUIDFilter NOT: [BlogPostScalarWhereInput!] OR: [BlogPostScalarWhereInput!] @@ -56,6 +227,7 @@ input BlogPostScalarWhereInput { input BlogPostUpdateInput { author: UserUpdateOneWithoutBlogPostsInput + comments: BlogPostCommentUpdateManyWithoutPostInput id: String text: String title: String @@ -90,7 +262,24 @@ input BlogPostUpdateManyWithWhereNestedInput { where: BlogPostScalarWhereInput! } +input BlogPostUpdateOneWithoutCommentsInput { + connect: BlogPostWhereUniqueInput + create: BlogPostCreateWithoutCommentsInput + delete: Boolean + disconnect: Boolean + update: BlogPostUpdateWithoutCommentsDataInput + upsert: BlogPostUpsertWithoutCommentsInput +} + input BlogPostUpdateWithoutAuthorDataInput { + comments: BlogPostCommentUpdateManyWithoutPostInput + id: String + text: String + title: String +} + +input BlogPostUpdateWithoutCommentsDataInput { + author: UserUpdateOneWithoutBlogPostsInput id: String text: String title: String @@ -101,6 +290,11 @@ input BlogPostUpdateWithWhereUniqueWithoutAuthorInput { where: BlogPostWhereUniqueInput! } +input BlogPostUpsertWithoutCommentsInput { + create: BlogPostCreateWithoutCommentsInput! + update: BlogPostUpdateWithoutCommentsDataInput! +} + input BlogPostUpsertWithWhereUniqueWithoutAuthorInput { create: BlogPostCreateWithoutAuthorInput! update: BlogPostUpdateWithoutAuthorDataInput! @@ -111,6 +305,7 @@ input BlogPostWhereInput { AND: [BlogPostWhereInput!] author: UserWhereInput authorId: NullableStringFilter + comments: BlogPostCommentFilter id: UUIDFilter NOT: [BlogPostWhereInput!] OR: [BlogPostWhereInput!] @@ -146,26 +341,32 @@ input IntFilter { type Mutation { createOneBlogPost(data: BlogPostCreateInput!): BlogPost! + createOneBlogPostComment(data: BlogPostCommentCreateInput!): BlogPostComment! createOneSomePublicRecordWithIntId(data: SomePublicRecordWithIntIdCreateInput!): SomePublicRecordWithIntId! createOneUser(data: UserCreateInput!): User! createOneUserRole(data: UserRoleCreateInput!): UserRole! deleteManyBlogPost(where: BlogPostWhereInput): BatchPayload! + deleteManyBlogPostComment(where: BlogPostCommentWhereInput): BatchPayload! deleteManySomePublicRecordWithIntId(where: SomePublicRecordWithIntIdWhereInput): BatchPayload! deleteManyUser(where: UserWhereInput): BatchPayload! deleteManyUserRole(where: UserRoleWhereInput): BatchPayload! deleteOneBlogPost(where: BlogPostWhereUniqueInput!): BlogPost + deleteOneBlogPostComment(where: BlogPostCommentWhereUniqueInput!): BlogPostComment deleteOneSomePublicRecordWithIntId(where: SomePublicRecordWithIntIdWhereUniqueInput!): SomePublicRecordWithIntId deleteOneUser(where: UserWhereUniqueInput!): User deleteOneUserRole(where: UserRoleWhereUniqueInput!): UserRole updateManyBlogPost(data: BlogPostUpdateManyMutationInput!, where: BlogPostWhereInput): BatchPayload! + updateManyBlogPostComment(data: BlogPostCommentUpdateManyMutationInput!, where: BlogPostCommentWhereInput): BatchPayload! updateManySomePublicRecordWithIntId(data: SomePublicRecordWithIntIdUpdateManyMutationInput!, where: SomePublicRecordWithIntIdWhereInput): BatchPayload! updateManyUser(data: UserUpdateManyMutationInput!, where: UserWhereInput): BatchPayload! updateManyUserRole(data: UserRoleUpdateManyMutationInput!, where: UserRoleWhereInput): BatchPayload! updateOneBlogPost(data: BlogPostUpdateInput!, where: BlogPostWhereUniqueInput!): BlogPost + updateOneBlogPostComment(data: BlogPostCommentUpdateInput!, where: BlogPostCommentWhereUniqueInput!): BlogPostComment updateOneSomePublicRecordWithIntId(data: SomePublicRecordWithIntIdUpdateInput!, where: SomePublicRecordWithIntIdWhereUniqueInput!): SomePublicRecordWithIntId updateOneUser(data: UserUpdateInput!, where: UserWhereUniqueInput!): User updateOneUserRole(data: UserRoleUpdateInput!, where: UserRoleWhereUniqueInput!): UserRole upsertOneBlogPost(create: BlogPostCreateInput!, update: BlogPostUpdateInput!, where: BlogPostWhereUniqueInput!): BlogPost! + upsertOneBlogPostComment(create: BlogPostCommentCreateInput!, update: BlogPostCommentUpdateInput!, where: BlogPostCommentWhereUniqueInput!): BlogPostComment! upsertOneSomePublicRecordWithIntId(create: SomePublicRecordWithIntIdCreateInput!, update: SomePublicRecordWithIntIdUpdateInput!, where: SomePublicRecordWithIntIdWhereUniqueInput!): SomePublicRecordWithIntId! upsertOneUser(create: UserCreateInput!, update: UserUpdateInput!, where: UserWhereUniqueInput!): User! upsertOneUserRole(create: UserRoleCreateInput!, update: UserRoleUpdateInput!, where: UserRoleWhereUniqueInput!): UserRole! @@ -203,6 +404,9 @@ enum OrderByArg { type Query { blogPost(where: BlogPostWhereUniqueInput!): BlogPost + blogPostComment(where: BlogPostCommentWhereUniqueInput!): BlogPostComment + blogPostComments(cursor: BlogPostCommentWhereUniqueInput, orderBy: BlogPostCommentOrderByInput, skip: Int, take: Int, where: BlogPostCommentWhereInput): [BlogPostComment!]! + blogPostCommentsCount(cursor: BlogPostCommentWhereUniqueInput, orderBy: BlogPostCommentOrderByInput, skip: Int, take: Int, where: BlogPostCommentWhereInput): Int! blogPosts(cursor: BlogPostWhereUniqueInput, orderBy: BlogPostOrderByInput, skip: Int, take: Int, where: BlogPostWhereInput): [BlogPost!]! blogPostsCount(cursor: BlogPostWhereUniqueInput, orderBy: BlogPostOrderByInput, skip: Int, take: Int, where: BlogPostWhereInput): Int! somePublicRecordWithIntId(where: SomePublicRecordWithIntIdWhereUniqueInput!): SomePublicRecordWithIntId @@ -266,12 +470,20 @@ input StringFilter { startsWith: String } +enum Topic { + TOPIC_ONE + TOPIC_THREE + TOPIC_TWO +} + type User { blogPosts(cursor: BlogPostWhereUniqueInput, skip: Int, take: Int): [BlogPost!]! + comments(cursor: BlogPostCommentWhereUniqueInput, skip: Int, take: Int): [BlogPostComment!]! email: String! firstName: String gender: Gender id: String! + interests: [Topic!]! lastName: String logs(from: String!, to: String!): [String!]! roles(cursor: UserRoleWhereUniqueInput, skip: Int, take: Int, where: UserRoleWhereInput): [UserRole!]! @@ -282,10 +494,12 @@ type User { input UserCreateInput { blogPosts: BlogPostCreateManyWithoutAuthorInput + comments: BlogPostCommentCreateManyWithoutAuthorInput email: String! firstName: String gender: Gender id: String + interests: UserCreateinterestsInput lastName: String roles: UserRoleCreateManyWithoutUsersInput userSocialMedia: UserSocialMediaCreateOneWithoutUserInput @@ -293,6 +507,10 @@ input UserCreateInput { yearOfBirth: Int } +input UserCreateinterestsInput { + set: [Topic!] +} + input UserCreateManyWithoutRolesInput { connect: [UserWhereUniqueInput!] create: [UserCreateWithoutRolesInput!] @@ -303,11 +521,31 @@ input UserCreateOneWithoutBlogPostsInput { create: UserCreateWithoutBlogPostsInput } +input UserCreateOneWithoutCommentsInput { + connect: UserWhereUniqueInput +} + input UserCreateWithoutBlogPostsInput { + comments: BlogPostCommentCreateManyWithoutAuthorInput email: String! firstName: String gender: Gender id: String + interests: UserCreateinterestsInput + lastName: String + roles: UserRoleCreateManyWithoutUsersInput + userSocialMedia: UserSocialMediaCreateOneWithoutUserInput + wantsNewsletter: Boolean! + yearOfBirth: Int +} + +input UserCreateWithoutCommentsInput { + blogPosts: BlogPostCreateManyWithoutAuthorInput + email: String! + firstName: String + gender: Gender + id: String + interests: UserCreateinterestsInput lastName: String roles: UserRoleCreateManyWithoutUsersInput userSocialMedia: UserSocialMediaCreateOneWithoutUserInput @@ -317,10 +555,12 @@ input UserCreateWithoutBlogPostsInput { input UserCreateWithoutRolesInput { blogPosts: BlogPostCreateManyWithoutAuthorInput + comments: BlogPostCommentCreateManyWithoutAuthorInput email: String! firstName: String gender: Gender id: String + interests: UserCreateinterestsInput lastName: String userSocialMedia: UserSocialMediaCreateOneWithoutUserInput wantsNewsletter: Boolean! @@ -449,6 +689,7 @@ input UserRoleWhereUniqueInput { input UserScalarWhereInput { AND: [UserScalarWhereInput!] blogPosts: BlogPostFilter + comments: BlogPostCommentFilter email: StringFilter firstName: NullableStringFilter gender: Gender @@ -516,10 +757,12 @@ input UserSocialMediaWhereUniqueInput { input UserUpdateInput { blogPosts: BlogPostUpdateManyWithoutAuthorInput + comments: BlogPostCommentUpdateManyWithoutAuthorInput email: String firstName: String gender: Gender id: String + interests: UserUpdateinterestsInput lastName: String roles: UserRoleUpdateManyWithoutUsersInput userSocialMedia: UserSocialMediaUpdateOneWithoutUserInput @@ -527,11 +770,16 @@ input UserUpdateInput { yearOfBirth: Int } +input UserUpdateinterestsInput { + set: [Topic!] +} + input UserUpdateManyDataInput { email: String firstName: String gender: Gender id: String + interests: UserUpdateinterestsInput lastName: String wantsNewsletter: Boolean yearOfBirth: Int @@ -542,6 +790,7 @@ input UserUpdateManyMutationInput { firstName: String gender: Gender id: String + interests: UserUpdateinterestsInput lastName: String wantsNewsletter: Boolean yearOfBirth: Int @@ -573,11 +822,36 @@ input UserUpdateOneWithoutBlogPostsInput { upsert: UserUpsertWithoutBlogPostsInput } +input UserUpdateOneWithoutCommentsInput { + connect: UserWhereUniqueInput + create: UserCreateWithoutCommentsInput + delete: Boolean + disconnect: Boolean + update: UserUpdateWithoutCommentsDataInput + upsert: UserUpsertWithoutCommentsInput +} + input UserUpdateWithoutBlogPostsDataInput { + comments: BlogPostCommentUpdateManyWithoutAuthorInput email: String firstName: String gender: Gender id: String + interests: UserUpdateinterestsInput + lastName: String + roles: UserRoleUpdateManyWithoutUsersInput + userSocialMedia: UserSocialMediaUpdateOneWithoutUserInput + wantsNewsletter: Boolean + yearOfBirth: Int +} + +input UserUpdateWithoutCommentsDataInput { + blogPosts: BlogPostUpdateManyWithoutAuthorInput + email: String + firstName: String + gender: Gender + id: String + interests: UserUpdateinterestsInput lastName: String roles: UserRoleUpdateManyWithoutUsersInput userSocialMedia: UserSocialMediaUpdateOneWithoutUserInput @@ -587,10 +861,12 @@ input UserUpdateWithoutBlogPostsDataInput { input UserUpdateWithoutRolesDataInput { blogPosts: BlogPostUpdateManyWithoutAuthorInput + comments: BlogPostCommentUpdateManyWithoutAuthorInput email: String firstName: String gender: Gender id: String + interests: UserUpdateinterestsInput lastName: String userSocialMedia: UserSocialMediaUpdateOneWithoutUserInput wantsNewsletter: Boolean @@ -607,6 +883,11 @@ input UserUpsertWithoutBlogPostsInput { update: UserUpdateWithoutBlogPostsDataInput! } +input UserUpsertWithoutCommentsInput { + create: UserCreateWithoutCommentsInput! + update: UserUpdateWithoutCommentsDataInput! +} + input UserUpsertWithWhereUniqueWithoutRolesInput { create: UserCreateWithoutRolesInput! update: UserUpdateWithoutRolesDataInput! @@ -616,6 +897,7 @@ input UserUpsertWithWhereUniqueWithoutRolesInput { input UserWhereInput { AND: [UserWhereInput!] blogPosts: BlogPostFilter + comments: BlogPostCommentFilter email: StringFilter firstName: NullableStringFilter gender: Gender