snowballtools-base-mirror/packages/gql-client
Vivian Phung a684743bd6
feat(template projects): generate git repo on backend (#218)
### TL;DR

- Still cretaes app if user migrates from page

The PR introduces a new `AddProjectFromTemplate` mutation to facilitate project creation using a repository template. This change centralizes the template project creation logic within the backend, improving code maintainability by removing redundant client-side code.

### What changed?
- Added `AddProjectFromTemplate` input type in `schema.gql` and corresponding TypeScript interfaces.
- Implemented `addProjectFromTemplate` resolver with error handling and Octokit integration for repository creation.
- Updated `service.ts` to include the new `addProjectFromTemplate` method.
- Created new GraphQL `Mutation` for `addProjectFromTemplate` in the GraphQL schema.
- Adjusted the client-side GQLClient to support the new mutation.
- Modified frontend to utilize the new backend mutation for project creation from a template.

### How to test?
1. Ensure your backend server is running.
2. Use a GraphQL client like Postman to call the `addProjectFromTemplate` mutation with appropriate input.
3. Verify that the new project is created using the specified template, and appropriate error messages are returned for failures.
4. Check the frontend flow for creating a project from a template to ensure it is working correctly.

### Why make this change?
This change enhances code maintainability by centralizing template project creation logic within the backend, thereby reducing redundancy and potential inconsistencies in client-side implementations.

---
2024-06-24 18:38:01 -04:00
..
dist feat(template projects): generate git repo on backend (#218) 2024-06-24 18:38:01 -04:00
src feat(template projects): generate git repo on backend (#218) 2024-06-24 18:38:01 -04:00
.eslintignore Set up a GQL client package (#19) 2024-02-01 11:37:57 +05:30
.eslintrc.json Change UI for create new project page (#54) 2024-02-05 16:56:53 +05:30
.gitignore feat: support cf workers 2024-04-24 09:59:47 -04:00
package.json [nit] remove package.json: No license field warning 2024-05-22 10:59:24 -04:00
tsconfig.json Set up a GQL client package (#19) 2024-02-01 11:37:57 +05:30