Skip to content

Commit

Permalink
feat: assisant total count and delete many
Browse files Browse the repository at this point in the history
  • Loading branch information
marian2js committed Dec 14, 2023
1 parent 0ae7fb2 commit 03c3cbc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/api/src/chat/resolvers/assistant.resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export class AssistantResolver extends BaseResolver(Assistant, {
CreateDTOClass: CreateAssistantInput,
UpdateDTOClass: UpdateAssistantInput,
guards: [GraphqlGuard],
enableTotalCount: true,
delete: { many: { disabled: false } },
}) {
constructor(
protected assistantService: AssistantService,
Expand Down
5 changes: 5 additions & 0 deletions generated/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -888,6 +888,7 @@ export interface CreateOneAssistantInput {

export interface CreateAssistantInput {
instructions: string;
enabled?: Nullable<boolean>;
}

export interface UpdateOneAssistantInput {
Expand All @@ -897,6 +898,7 @@ export interface UpdateOneAssistantInput {

export interface UpdateAssistantInput {
instructions?: Nullable<string>;
enabled?: Nullable<boolean>;
}

export interface DeleteOneAssistantInput {
Expand Down Expand Up @@ -1398,6 +1400,7 @@ export interface Assistant {
id: string;
createdAt: DateTime;
instructions: string;
enabled?: Nullable<boolean>;
}

export interface Campaign {
Expand All @@ -1419,6 +1422,7 @@ export interface AssistantDeleteResponse {
id?: Nullable<string>;
createdAt?: Nullable<DateTime>;
instructions?: Nullable<string>;
enabled?: Nullable<boolean>;
}

export interface AssistantEdge {
Expand All @@ -1429,6 +1433,7 @@ export interface AssistantEdge {
export interface AssistantConnection {
pageInfo: PageInfo;
edges: AssistantEdge[];
totalCount: number;
}

export interface CampaignDeleteResponse {
Expand Down
7 changes: 7 additions & 0 deletions generated/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,7 @@ type Assistant {
id: ID!
createdAt: DateTime!
instructions: String!
enabled: Boolean
}

type Campaign {
Expand All @@ -819,6 +820,7 @@ type AssistantDeleteResponse {
id: ID
createdAt: DateTime
instructions: String
enabled: Boolean
}

type AssistantEdge {
Expand All @@ -835,6 +837,9 @@ type AssistantConnection {

"""Array of edges."""
edges: [AssistantEdge!]!

"""Fetch total count of records"""
totalCount: Int!
}

type CampaignDeleteResponse {
Expand Down Expand Up @@ -2223,6 +2228,7 @@ input CreateOneAssistantInput {

input CreateAssistantInput {
instructions: String!
enabled: Boolean
}

input UpdateOneAssistantInput {
Expand All @@ -2235,6 +2241,7 @@ input UpdateOneAssistantInput {

input UpdateAssistantInput {
instructions: String
enabled: Boolean
}

input DeleteOneAssistantInput {
Expand Down

0 comments on commit 03c3cbc

Please sign in to comment.