diff --git a/frontend/apollo.config.js b/frontend/apollo.config.js new file mode 100644 index 00000000..95a82d36 --- /dev/null +++ b/frontend/apollo.config.js @@ -0,0 +1,11 @@ +/* eslint-env node */ +module.exports = { + client: { + service: { + name: 'codefox-backend1', + localSchemaFile: './src/graphql/schema.gql', + }, + includes: ['./src/**/*.{js,ts,tsx}'], + excludes: ['**/__tests__/**'], + }, +}; diff --git a/frontend/src/components/file-sidebar.tsx b/frontend/src/components/file-sidebar.tsx index a9d9ada9..deefbac5 100644 --- a/frontend/src/components/file-sidebar.tsx +++ b/frontend/src/components/file-sidebar.tsx @@ -7,7 +7,6 @@ import { SquarePen } from 'lucide-react'; import SidebarSkeleton from './sidebar-skeleton'; import UserSettings from './user-settings'; import { SideBarItem } from './sidebar-item'; -import { Chat } from '@/graphql/type'; import { EventEnum } from '../const/EventEnum'; import { SidebarContent, diff --git a/frontend/src/graphql/request.ts b/frontend/src/graphql/request.ts index 0b61257c..664fdcb6 100644 --- a/frontend/src/graphql/request.ts +++ b/frontend/src/graphql/request.ts @@ -28,17 +28,6 @@ export const CREATE_CHAT = gql` } `; -export const SAVE_CHAT_HISTORY = gql` - mutation SaveChatHistory($chatId: String!, $messages: [MessageInput!]!) { - saveChatHistory(chatId: $chatId, messages: $messages) { - id - content - role - createdAt - } - } -`; - export const GET_CHAT_HISTORY = gql` query GetChatHistory($chatId: String!) { getChatHistory(chatId: $chatId) { @@ -138,20 +127,6 @@ export const GET_USER_PROJECTS = gql` } `; -export const GET_PROJECT_DETAILS = gql` - query GetProjectDetails($projectId: String!) { - getProjectDetails(projectId: $projectId) { - id - projectName - path - projectPackages { - id - content - } - } - } -`; - export const CREATE_PROJECT = gql` mutation CreateProject($createProjectInput: CreateProjectInput!) { createProject(createProjectInput: $createProjectInput) { @@ -167,25 +142,3 @@ export const getUserProjects = async (client: ApolloClient) => { const response = await client.query({ query: GET_USER_PROJECTS }); return response.data.getUserProjects; }; - -export const getProjectDetails = async ( - client: ApolloClient, - projectId: string -) => { - const response = await client.query({ - query: GET_PROJECT_DETAILS, - variables: { projectId }, - }); - return response.data.getProjectDetails; -}; - -export const createProject = async ( - client: ApolloClient, - createProjectInput: any -) => { - const response = await client.mutate({ - mutation: CREATE_PROJECT, - variables: { createProjectInput }, - }); - return response.data.createProject; -};