Skip to content

Commit

Permalink
fix: typegraphql total aggregate query (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
matcic authored Jul 30, 2021
1 parent a60132a commit eb491ec
Show file tree
Hide file tree
Showing 8 changed files with 408 additions and 5 deletions.
30 changes: 30 additions & 0 deletions packages/dataprovider/generated/nexus-prisma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ type CustomScalars = "Json" | "DateTime";
// Prisma model type definitions
interface PrismaModels {
UserRole: Prisma.UserRole;
Company: Prisma.Company;
UserSocialMedia: Prisma.UserSocialMedia;
BlogPost: Prisma.BlogPost;
BlogPostComment: Prisma.BlogPostComment;
Expand All @@ -29,6 +30,10 @@ interface NexusPrismaInputs {
filtering: "AND" | "OR" | "NOT" | "id" | "name" | "users";
ordering: "id" | "name" | "users";
};
companies: {
filtering: "AND" | "OR" | "NOT" | "id" | "name" | "user" | "userId";
ordering: "id" | "name" | "user" | "userId";
};
userSocialMedias: {
filtering:
| "AND"
Expand Down Expand Up @@ -85,6 +90,7 @@ interface NexusPrismaInputs {
| "address"
| "blogPosts"
| "comments"
| "companies"
| "weddingDate";
ordering:
| "id"
Expand All @@ -100,6 +106,7 @@ interface NexusPrismaInputs {
| "address"
| "blogPosts"
| "comments"
| "companies"
| "weddingDate";
};
filteringTests: {
Expand Down Expand Up @@ -153,6 +160,7 @@ interface NexusPrismaInputs {
| "address"
| "blogPosts"
| "comments"
| "companies"
| "weddingDate";
ordering:
| "id"
Expand All @@ -168,9 +176,11 @@ interface NexusPrismaInputs {
| "address"
| "blogPosts"
| "comments"
| "companies"
| "weddingDate";
};
};
Company: {};
UserSocialMedia: {};
BlogPost: {
comments: {
Expand Down Expand Up @@ -219,6 +229,10 @@ interface NexusPrismaInputs {
| "authorId";
ordering: "id" | "text" | "post" | "postId" | "author" | "authorId";
};
companies: {
filtering: "AND" | "OR" | "NOT" | "id" | "name" | "user" | "userId";
ordering: "id" | "name" | "user" | "userId";
};
};
FilteringTest: {};
SomePublicRecordWithIntId: {};
Expand All @@ -229,6 +243,8 @@ interface NexusPrismaOutputs {
Query: {
userRole: "UserRole";
userRoles: "UserRole";
company: "Company";
companies: "Company";
userSocialMedia: "UserSocialMedia";
userSocialMedias: "UserSocialMedia";
blogPost: "BlogPost";
Expand All @@ -249,6 +265,12 @@ interface NexusPrismaOutputs {
deleteOneUserRole: "UserRole";
deleteManyUserRole: "AffectedRowsOutput";
upsertOneUserRole: "UserRole";
createOneCompany: "Company";
updateOneCompany: "Company";
updateManyCompany: "AffectedRowsOutput";
deleteOneCompany: "Company";
deleteManyCompany: "AffectedRowsOutput";
upsertOneCompany: "Company";
createOneUserSocialMedia: "UserSocialMedia";
updateOneUserSocialMedia: "UserSocialMedia";
updateManyUserSocialMedia: "AffectedRowsOutput";
Expand Down Expand Up @@ -291,6 +313,12 @@ interface NexusPrismaOutputs {
name: "String";
users: "User";
};
Company: {
id: "String";
name: "String";
user: "User";
userId: "String";
};
UserSocialMedia: {
id: "String";
instagram: "String";
Expand Down Expand Up @@ -328,6 +356,7 @@ interface NexusPrismaOutputs {
address: "Json";
blogPosts: "BlogPost";
comments: "BlogPostComment";
companies: "Company";
weddingDate: "DateTime";
};
FilteringTest: {
Expand All @@ -351,6 +380,7 @@ interface NexusPrismaOutputs {
// Helper to gather all methods relative to a model
interface NexusPrismaMethods {
UserRole: Typegen.NexusPrismaFields<"UserRole">;
Company: Typegen.NexusPrismaFields<"Company">;
UserSocialMedia: Typegen.NexusPrismaFields<"UserSocialMedia">;
BlogPost: Typegen.NexusPrismaFields<"BlogPost">;
BlogPostComment: Typegen.NexusPrismaFields<"BlogPostComment">;
Expand Down
151 changes: 151 additions & 0 deletions packages/dataprovider/generated/nexus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,116 @@ export interface NexusGenInputs {
equals?: boolean | null; // Boolean
not?: NexusGenInputs["NestedBoolFilter"] | null; // NestedBoolFilter
};
CompanyCreateManyUserInput: {
// input type
id?: string | null; // String
name: string; // String!
};
CompanyCreateManyUserInputEnvelope: {
// input type
data?: NexusGenInputs["CompanyCreateManyUserInput"][] | null; // [CompanyCreateManyUserInput!]
skipDuplicates?: boolean | null; // Boolean
};
CompanyCreateNestedManyWithoutUserInput: {
// input type
connect?: NexusGenInputs["CompanyWhereUniqueInput"][] | null; // [CompanyWhereUniqueInput!]
connectOrCreate?:
| NexusGenInputs["CompanyCreateOrConnectWithoutUserInput"][]
| null; // [CompanyCreateOrConnectWithoutUserInput!]
create?: NexusGenInputs["CompanyCreateWithoutUserInput"][] | null; // [CompanyCreateWithoutUserInput!]
createMany?: NexusGenInputs["CompanyCreateManyUserInputEnvelope"] | null; // CompanyCreateManyUserInputEnvelope
};
CompanyCreateOrConnectWithoutUserInput: {
// input type
create: NexusGenInputs["CompanyCreateWithoutUserInput"]; // CompanyCreateWithoutUserInput!
where: NexusGenInputs["CompanyWhereUniqueInput"]; // CompanyWhereUniqueInput!
};
CompanyCreateWithoutUserInput: {
// input type
id?: string | null; // String
name: string; // String!
};
CompanyListRelationFilter: {
// input type
every?: NexusGenInputs["CompanyWhereInput"] | null; // CompanyWhereInput
none?: NexusGenInputs["CompanyWhereInput"] | null; // CompanyWhereInput
some?: NexusGenInputs["CompanyWhereInput"] | null; // CompanyWhereInput
};
CompanyOrderByRelationAggregateInput: {
// input type
count: NexusGenEnums["SortOrder"]; // SortOrder!
};
CompanyScalarWhereInput: {
// input type
AND?: NexusGenInputs["CompanyScalarWhereInput"][] | null; // [CompanyScalarWhereInput!]
NOT?: NexusGenInputs["CompanyScalarWhereInput"][] | null; // [CompanyScalarWhereInput!]
OR?: NexusGenInputs["CompanyScalarWhereInput"][] | null; // [CompanyScalarWhereInput!]
id?: NexusGenInputs["StringFilter"] | null; // StringFilter
name?: NexusGenInputs["StringFilter"] | null; // StringFilter
userId?: NexusGenInputs["StringFilter"] | null; // StringFilter
};
CompanyUpdateManyMutationInput: {
// input type
id?: NexusGenInputs["StringFieldUpdateOperationsInput"] | null; // StringFieldUpdateOperationsInput
name?: NexusGenInputs["StringFieldUpdateOperationsInput"] | null; // StringFieldUpdateOperationsInput
};
CompanyUpdateManyWithWhereWithoutUserInput: {
// input type
data: NexusGenInputs["CompanyUpdateManyMutationInput"]; // CompanyUpdateManyMutationInput!
where: NexusGenInputs["CompanyScalarWhereInput"]; // CompanyScalarWhereInput!
};
CompanyUpdateManyWithoutUserInput: {
// input type
connect?: NexusGenInputs["CompanyWhereUniqueInput"][] | null; // [CompanyWhereUniqueInput!]
connectOrCreate?:
| NexusGenInputs["CompanyCreateOrConnectWithoutUserInput"][]
| null; // [CompanyCreateOrConnectWithoutUserInput!]
create?: NexusGenInputs["CompanyCreateWithoutUserInput"][] | null; // [CompanyCreateWithoutUserInput!]
createMany?: NexusGenInputs["CompanyCreateManyUserInputEnvelope"] | null; // CompanyCreateManyUserInputEnvelope
delete?: NexusGenInputs["CompanyWhereUniqueInput"][] | null; // [CompanyWhereUniqueInput!]
deleteMany?: NexusGenInputs["CompanyScalarWhereInput"][] | null; // [CompanyScalarWhereInput!]
disconnect?: NexusGenInputs["CompanyWhereUniqueInput"][] | null; // [CompanyWhereUniqueInput!]
set?: NexusGenInputs["CompanyWhereUniqueInput"][] | null; // [CompanyWhereUniqueInput!]
update?:
| NexusGenInputs["CompanyUpdateWithWhereUniqueWithoutUserInput"][]
| null; // [CompanyUpdateWithWhereUniqueWithoutUserInput!]
updateMany?:
| NexusGenInputs["CompanyUpdateManyWithWhereWithoutUserInput"][]
| null; // [CompanyUpdateManyWithWhereWithoutUserInput!]
upsert?:
| NexusGenInputs["CompanyUpsertWithWhereUniqueWithoutUserInput"][]
| null; // [CompanyUpsertWithWhereUniqueWithoutUserInput!]
};
CompanyUpdateWithWhereUniqueWithoutUserInput: {
// input type
data: NexusGenInputs["CompanyUpdateWithoutUserInput"]; // CompanyUpdateWithoutUserInput!
where: NexusGenInputs["CompanyWhereUniqueInput"]; // CompanyWhereUniqueInput!
};
CompanyUpdateWithoutUserInput: {
// input type
id?: NexusGenInputs["StringFieldUpdateOperationsInput"] | null; // StringFieldUpdateOperationsInput
name?: NexusGenInputs["StringFieldUpdateOperationsInput"] | null; // StringFieldUpdateOperationsInput
};
CompanyUpsertWithWhereUniqueWithoutUserInput: {
// input type
create: NexusGenInputs["CompanyCreateWithoutUserInput"]; // CompanyCreateWithoutUserInput!
update: NexusGenInputs["CompanyUpdateWithoutUserInput"]; // CompanyUpdateWithoutUserInput!
where: NexusGenInputs["CompanyWhereUniqueInput"]; // CompanyWhereUniqueInput!
};
CompanyWhereInput: {
// input type
AND?: NexusGenInputs["CompanyWhereInput"][] | null; // [CompanyWhereInput!]
NOT?: NexusGenInputs["CompanyWhereInput"][] | null; // [CompanyWhereInput!]
OR?: NexusGenInputs["CompanyWhereInput"][] | null; // [CompanyWhereInput!]
id?: NexusGenInputs["StringFilter"] | null; // StringFilter
name?: NexusGenInputs["StringFilter"] | null; // StringFilter
user?: NexusGenInputs["UserWhereInput"] | null; // UserWhereInput
userId?: NexusGenInputs["StringFilter"] | null; // StringFilter
};
CompanyWhereUniqueInput: {
// input type
id?: string | null; // String
};
DateTimeFieldUpdateOperationsInput: {
// input type
set?: NexusGenScalars["DateTime"] | null; // DateTime
Expand Down Expand Up @@ -795,6 +905,9 @@ export interface NexusGenInputs {
comments?:
| NexusGenInputs["BlogPostCommentCreateNestedManyWithoutAuthorInput"]
| null; // BlogPostCommentCreateNestedManyWithoutAuthorInput
companies?:
| NexusGenInputs["CompanyCreateNestedManyWithoutUserInput"]
| null; // CompanyCreateNestedManyWithoutUserInput
email: string; // String!
firstName?: string | null; // String
gender?: NexusGenEnums["Gender"] | null; // Gender
Expand Down Expand Up @@ -858,6 +971,9 @@ export interface NexusGenInputs {
comments?:
| NexusGenInputs["BlogPostCommentCreateNestedManyWithoutAuthorInput"]
| null; // BlogPostCommentCreateNestedManyWithoutAuthorInput
companies?:
| NexusGenInputs["CompanyCreateNestedManyWithoutUserInput"]
| null; // CompanyCreateNestedManyWithoutUserInput
email: string; // String!
firstName?: string | null; // String
gender?: NexusGenEnums["Gender"] | null; // Gender
Expand All @@ -878,6 +994,9 @@ export interface NexusGenInputs {
blogPosts?:
| NexusGenInputs["BlogPostCreateNestedManyWithoutAuthorInput"]
| null; // BlogPostCreateNestedManyWithoutAuthorInput
companies?:
| NexusGenInputs["CompanyCreateNestedManyWithoutUserInput"]
| null; // CompanyCreateNestedManyWithoutUserInput
email: string; // String!
firstName?: string | null; // String
gender?: NexusGenEnums["Gender"] | null; // Gender
Expand All @@ -901,6 +1020,9 @@ export interface NexusGenInputs {
comments?:
| NexusGenInputs["BlogPostCommentCreateNestedManyWithoutAuthorInput"]
| null; // BlogPostCommentCreateNestedManyWithoutAuthorInput
companies?:
| NexusGenInputs["CompanyCreateNestedManyWithoutUserInput"]
| null; // CompanyCreateNestedManyWithoutUserInput
email: string; // String!
firstName?: string | null; // String
gender?: NexusGenEnums["Gender"] | null; // Gender
Expand Down Expand Up @@ -935,6 +1057,7 @@ export interface NexusGenInputs {
comments?:
| NexusGenInputs["BlogPostCommentOrderByRelationAggregateInput"]
| null; // BlogPostCommentOrderByRelationAggregateInput
companies?: NexusGenInputs["CompanyOrderByRelationAggregateInput"] | null; // CompanyOrderByRelationAggregateInput
email?: NexusGenEnums["SortOrder"] | null; // SortOrder
firstName?: NexusGenEnums["SortOrder"] | null; // SortOrder
gender?: NexusGenEnums["SortOrder"] | null; // SortOrder
Expand Down Expand Up @@ -1151,6 +1274,7 @@ export interface NexusGenInputs {
comments?:
| NexusGenInputs["BlogPostCommentUpdateManyWithoutAuthorInput"]
| null; // BlogPostCommentUpdateManyWithoutAuthorInput
companies?: NexusGenInputs["CompanyUpdateManyWithoutUserInput"] | null; // CompanyUpdateManyWithoutUserInput
email?: NexusGenInputs["StringFieldUpdateOperationsInput"] | null; // StringFieldUpdateOperationsInput
firstName?:
| NexusGenInputs["NullableStringFieldUpdateOperationsInput"]
Expand Down Expand Up @@ -1259,6 +1383,7 @@ export interface NexusGenInputs {
comments?:
| NexusGenInputs["BlogPostCommentUpdateManyWithoutAuthorInput"]
| null; // BlogPostCommentUpdateManyWithoutAuthorInput
companies?: NexusGenInputs["CompanyUpdateManyWithoutUserInput"] | null; // CompanyUpdateManyWithoutUserInput
email?: NexusGenInputs["StringFieldUpdateOperationsInput"] | null; // StringFieldUpdateOperationsInput
firstName?:
| NexusGenInputs["NullableStringFieldUpdateOperationsInput"]
Expand Down Expand Up @@ -1287,6 +1412,7 @@ export interface NexusGenInputs {
// input type
address?: NexusGenScalars["Json"] | null; // Json
blogPosts?: NexusGenInputs["BlogPostUpdateManyWithoutAuthorInput"] | null; // BlogPostUpdateManyWithoutAuthorInput
companies?: NexusGenInputs["CompanyUpdateManyWithoutUserInput"] | null; // CompanyUpdateManyWithoutUserInput
email?: NexusGenInputs["StringFieldUpdateOperationsInput"] | null; // StringFieldUpdateOperationsInput
firstName?:
| NexusGenInputs["NullableStringFieldUpdateOperationsInput"]
Expand Down Expand Up @@ -1318,6 +1444,7 @@ export interface NexusGenInputs {
comments?:
| NexusGenInputs["BlogPostCommentUpdateManyWithoutAuthorInput"]
| null; // BlogPostCommentUpdateManyWithoutAuthorInput
companies?: NexusGenInputs["CompanyUpdateManyWithoutUserInput"] | null; // CompanyUpdateManyWithoutUserInput
email?: NexusGenInputs["StringFieldUpdateOperationsInput"] | null; // StringFieldUpdateOperationsInput
firstName?:
| NexusGenInputs["NullableStringFieldUpdateOperationsInput"]
Expand Down Expand Up @@ -1370,6 +1497,7 @@ export interface NexusGenInputs {
address?: NexusGenInputs["JsonNullableFilter"] | null; // JsonNullableFilter
blogPosts?: NexusGenInputs["BlogPostListRelationFilter"] | null; // BlogPostListRelationFilter
comments?: NexusGenInputs["BlogPostCommentListRelationFilter"] | null; // BlogPostCommentListRelationFilter
companies?: NexusGenInputs["CompanyListRelationFilter"] | null; // CompanyListRelationFilter
email?: NexusGenInputs["StringFilter"] | null; // StringFilter
firstName?: NexusGenInputs["StringNullableFilter"] | null; // StringNullableFilter
gender?: NexusGenInputs["EnumGenderNullableFilter"] | null; // EnumGenderNullableFilter
Expand Down Expand Up @@ -1428,6 +1556,11 @@ export interface NexusGenObjects {
id: string; // String!
text: string; // String!
};
Company: {
// root type
id: string; // String!
name: string; // String!
};
FilteringTest: {
// root type
boolField: boolean; // Boolean!
Expand Down Expand Up @@ -1511,6 +1644,11 @@ export interface NexusGenFieldTypes {
post: NexusGenRootTypes["BlogPost"] | null; // BlogPost
text: string; // String!
};
Company: {
// field return type
id: string; // String!
name: string; // String!
};
FilteringTest: {
// field return type
boolField: boolean; // Boolean!
Expand Down Expand Up @@ -1600,6 +1738,7 @@ export interface NexusGenFieldTypes {
address: NexusGenRootTypes["Address"] | null; // Address
blogPosts: NexusGenRootTypes["BlogPost"][]; // [BlogPost!]!
comments: NexusGenRootTypes["BlogPostComment"][]; // [BlogPostComment!]!
companies: NexusGenRootTypes["Company"][]; // [Company!]!
email: string; // String!
firstName: string | null; // String
gender: NexusGenEnums["Gender"] | null; // Gender
Expand Down Expand Up @@ -1653,6 +1792,11 @@ export interface NexusGenFieldTypeNames {
post: "BlogPost";
text: "String";
};
Company: {
// field return type name
id: "String";
name: "String";
};
FilteringTest: {
// field return type name
boolField: "Boolean";
Expand Down Expand Up @@ -1736,6 +1880,7 @@ export interface NexusGenFieldTypeNames {
address: "Address";
blogPosts: "BlogPost";
comments: "BlogPostComment";
companies: "Company";
email: "String";
firstName: "String";
gender: "Gender";
Expand Down Expand Up @@ -2091,6 +2236,12 @@ export interface NexusGenArgTypes {
skip?: number | null; // Int
take?: number | null; // Int
};
companies: {
// args
cursor?: NexusGenInputs["CompanyWhereUniqueInput"] | null; // CompanyWhereUniqueInput
skip?: number | null; // Int
take?: number | null; // Int
};
logs: {
// args
from: string; // String!
Expand Down
Loading

0 comments on commit eb491ec

Please sign in to comment.