diff --git a/client/src/js/types/schema.ts b/client/src/js/types/schema.ts index f245397..4f21d47 100644 --- a/client/src/js/types/schema.ts +++ b/client/src/js/types/schema.ts @@ -1,56 +1,43 @@ export type Maybe = T | null; export type InputMaybe = Maybe; -export type Exact = { - [K in keyof T]: T[K]; -}; -export type MakeOptional = Omit & { - [SubKey in K]?: Maybe; -}; -export type MakeMaybe = Omit & { - [SubKey in K]: Maybe; -}; -export type MakeEmpty< - T extends { [key: string]: unknown }, - K extends keyof T, -> = { [_ in K]?: never }; -export type Incremental = - | T - | { - [P in keyof T]?: P extends " $fragmentName" | "__typename" ? T[P] : never; - }; +export type Exact = { [K in keyof T]: T[K] }; +export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; +export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; +export type MakeEmpty = { [_ in K]?: never }; +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; + ID: { input: string; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } /** An ISO 8601-encoded datetime */ - ISO8601DateTime: { input: any; output: any }; + ISO8601DateTime: { input: any; output: any; } }; /** Autogenerated return type of CompleteTask. */ export type CompleteTaskPayload = { - __typename?: "CompleteTaskPayload"; - errors?: Maybe>; - ok?: Maybe; + __typename?: 'CompleteTaskPayload'; + errors?: Maybe>; + ok?: Maybe; }; /** Autogenerated return type of CreateTask. */ export type CreateTaskPayload = { - __typename?: "CreateTaskPayload"; - errors: Array; + __typename?: 'CreateTaskPayload'; + errors: Array; }; /** Autogenerated return type of DestroyTask. */ export type DestroyTaskPayload = { - __typename?: "DestroyTaskPayload"; - errors?: Maybe>; - ok?: Maybe; + __typename?: 'DestroyTaskPayload'; + errors?: Maybe>; + ok?: Maybe; }; export type Mutation = { - __typename?: "Mutation"; + __typename?: 'Mutation'; completeTask?: Maybe; createTask?: Maybe; destroyTask?: Maybe; @@ -58,89 +45,97 @@ export type Mutation = { updateTask?: Maybe; }; + export type MutationCompleteTaskArgs = { - taskId: Scalars["Int"]["input"]; + taskId: Scalars['Int']['input']; }; + export type MutationCreateTaskArgs = { input: TaskInput; }; + export type MutationDestroyTaskArgs = { - taskId: Scalars["Int"]["input"]; + taskId: Scalars['Int']['input']; }; + export type MutationSetRandomProjectColorArgs = { - projectId: Scalars["Int"]["input"]; + projectId: Scalars['Int']['input']; }; + export type MutationUpdateTaskArgs = { input: TaskInput; - taskId: Scalars["Int"]["input"]; + taskId: Scalars['Int']['input']; }; export type Project = { - __typename?: "Project"; - color: Scalars["String"]["output"]; - id: Scalars["Int"]["output"]; - name: Scalars["String"]["output"]; - path: Scalars["String"]["output"]; + __typename?: 'Project'; + color: Scalars['String']['output']; + id: Scalars['Int']['output']; + name: Scalars['String']['output']; + openTaskCount: Scalars['Int']['output']; + path: Scalars['String']['output']; tasks: Array; }; export type Query = { - __typename?: "Query"; + __typename?: 'Query'; findTask?: Maybe; projects: Array; tasks: Array; }; + export type QueryFindTaskArgs = { - taskId: Scalars["Int"]["input"]; + taskId: Scalars['Int']['input']; }; + export type QueryTasksArgs = { - projectId?: InputMaybe; + projectId?: InputMaybe; status: TaskStatus; }; /** Autogenerated return type of SetRandomProjectColor. */ export type SetRandomProjectColorPayload = { - __typename?: "SetRandomProjectColorPayload"; - errors: Array; + __typename?: 'SetRandomProjectColorPayload'; + errors: Array; project?: Maybe; }; export type Task = { - __typename?: "Task"; - content: Scalars["String"]["output"]; - id: Scalars["Int"]["output"]; - inProgress: Scalars["Boolean"]["output"]; - isBacklogged: Scalars["Boolean"]["output"]; - isComplete: Scalars["Boolean"]["output"]; - isReady: Scalars["Boolean"]["output"]; + __typename?: 'Task'; + content: Scalars['String']['output']; + id: Scalars['Int']['output']; + inProgress: Scalars['Boolean']['output']; + isBacklogged: Scalars['Boolean']['output']; + isComplete: Scalars['Boolean']['output']; + isReady: Scalars['Boolean']['output']; project: Project; status: TaskStatus; - title: Scalars["String"]["output"]; - updatedAt: Scalars["ISO8601DateTime"]["output"]; + title: Scalars['String']['output']; + updatedAt: Scalars['ISO8601DateTime']['output']; }; export type TaskInput = { - content?: InputMaybe; - projectId?: InputMaybe; + content?: InputMaybe; + projectId?: InputMaybe; status?: InputMaybe; - title?: InputMaybe; + title?: InputMaybe; }; export enum TaskStatus { - Backlog = "backlog", - Complete = "complete", - InProgress = "in_progress", - Ready = "ready", + Backlog = 'backlog', + Complete = 'complete', + InProgress = 'in_progress', + Ready = 'ready' } /** Autogenerated return type of UpdateTask. */ export type UpdateTaskPayload = { - __typename?: "UpdateTaskPayload"; - errors: Array; + __typename?: 'UpdateTaskPayload'; + errors: Array; }; diff --git a/host/rake/tasks/schema.rake b/host/rake/tasks/schema.rake index 19c2be4..807f449 100644 --- a/host/rake/tasks/schema.rake +++ b/host/rake/tasks/schema.rake @@ -6,7 +6,7 @@ namespace :schema do task :'regen:server' do Dir.chdir(workdir) do require "twenty/server" - schema = File.join(Dir.getwd, "share", "server", "schema.graphql") + schema = File.join(Dir.getwd, "server", "share", "twenty", "server", "schema.graphql") mkdir_p File.dirname(schema) File.binwrite schema, Twenty::GraphQL::Schema.to_definition end diff --git a/server/share/twenty/server/schema.graphql b/server/share/twenty/server/schema.graphql index 5ad6abb..420e832 100644 --- a/server/share/twenty/server/schema.graphql +++ b/server/share/twenty/server/schema.graphql @@ -38,6 +38,7 @@ type Project { color: String! id: Int! name: String! + openTaskCount: Int! path: String! tasks: [Task!]! }