-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add TypeScript GraphQL resolvers and update Fastify server configuration #25
Commits on Jan 2, 2024
-
Update several components and backend setup
Several frontend components were updated to fix minor spelling issues and import order. The backend node script has been updated to use TypeScript files instead of JavaScript. The backend package.json has been updated with newer dependencies and included build script. Some string literals were also changed in the backend server to lower case.
Configuration menu - View commit details
-
Copy full SHA for 85fef0f - Browse repository at this point
Copy the full SHA 85fef0fView commit details -
Update Docker and package configurations for TypeScript
This update focuses on enhancing TypeScript compatibility by introducing a new dev dependency "ts-node" for better TypeScript runtime support. The "type" field is added to package.json making the project a module, and a new command "dev:ts" has been added to allow running the project using ts-node. A "built" exception is placed in .dockerignore. Command for running the development server inside Docker was adjusted accordingly.
Configuration menu - View commit details
-
Copy full SHA for 8fc0684 - Browse repository at this point
Copy the full SHA 8fc0684View commit details -
Update build configuration and ignore files
Updated Docker and ignore files to better handle typescript build files, and switched to SWC for faster compilation. The changes include updating the output directory from 'built' to 'dist', adding SWC as a dev dependency, and adding 'dist' to the list of docker ignored paths.
Configuration menu - View commit details
-
Copy full SHA for a5d79a9 - Browse repository at this point
Copy the full SHA a5d79a9View commit details -
Delete all database migration files
This commit completely removes all database migration files in the backend/src/db/migrations directory. The files include migrations for creating tables such as "projects", "users", "boards", "issue_statuses", and more. It seems like some foundational changes are planned for the structure of the backend database necessitating the removal of all these migrations.
Configuration menu - View commit details
-
Copy full SHA for c1461f0 - Browse repository at this point
Copy the full SHA c1461f0View commit details -
Configuration menu - View commit details
-
Copy full SHA for fec0c22 - Browse repository at this point
Copy the full SHA fec0c22View commit details -
Update backend configurations and fix issues in various files
This commit includes several updates across multiple files for the backend, including revising import paths, updating build and execution scripts, and refining TypeScript configuration. The primary focus has been improving compatibility between files and making sure necessary configurations are appropriately updated.
Configuration menu - View commit details
-
Copy full SHA for fb9b2cf - Browse repository at this point
Copy the full SHA fb9b2cfView commit details
Commits on Jan 3, 2024
-
Delete all database migration files
This commit completely removes all database migration files in the backend/src/db/migrations directory. The files include migrations for creating tables such as "projects", "users", "boards", "issue_statuses", and more. It seems like some foundational changes are planned for the structure of the backend database necessitating the removal of all these migrations.
Configuration menu - View commit details
-
Copy full SHA for 7d130f7 - Browse repository at this point
Copy the full SHA 7d130f7View commit details -
Refactor backend code and remove docker-compose-clay.yml
The `docker-compose-clay.yml` file was removed as it's no longer needed. The backend code on `index.ts` was refactored, moving several interface definitions to a new typings file at `backend/src/typings/index.ts`. A minor adjustment was also made to handling multipart requests. A `pnpm-lock.yaml` file was created for project dependencies.
Configuration menu - View commit details
-
Copy full SHA for 45b76a5 - Browse repository at this point
Copy the full SHA 45b76a5View commit details -
Update backend codebase, introduce Fastify handlers
The update includes major restructuring in the backend codebase, primarily focused on introducing individual Fastify handlers for different server functionalities. Also, backend typings and model definitions have been moved to a different file. Dependencies and scripts in package.json have been updated, and new files fastify-ws.ts and hocuspocus.ts have been added. Finally, the Dockerfile.local and .tool-versions files have been adjusted accordingly.
Configuration menu - View commit details
-
Copy full SHA for 7165c59 - Browse repository at this point
Copy the full SHA 7165c59View commit details
Commits on Jan 4, 2024
-
Refactor backend database models with enhanced Sequelize typings
This code revision refactors the database models on the backend. The refactoring process involves enhancing and integrating Sequelize TypeScript typings, replacing 'DataTypes' with more specific Sequelize model types, and improving the correct typing of certain variables and return types. This will for sure facilitate scaling and ongoing development by boosting type safety, understanding, and editor-aided inspections of the models.
Configuration menu - View commit details
-
Copy full SHA for f560bd4 - Browse repository at this point
Copy the full SHA f560bd4View commit details -
Add MinioGetObjectResponse type and update file handling
We have introduced a new type, MinioGetObjectResponse, in the server index for better data structure comprehension. This change reflects an update in the way we handle files in the '/uploads/:file' route, removing the previously needed '@ts-ignore' and enhancing TypeScript integration. This should streamline file processing in the backend and improve overall code clarity.
Configuration menu - View commit details
-
Copy full SHA for e2dcbc3 - Browse repository at this point
Copy the full SHA e2dcbc3View commit details -
Refactor CORS configuration in server index
The CORS settings in the server index file have been refactored. The previous CORS settings relied on hard-coded conditions, this update introduces the usage of a separate handler function for setting up CORS OPTIONS. This will ensure modularity and improves the flexibility of the CORS configuration.
Configuration menu - View commit details
-
Copy full SHA for e17ab30 - Browse repository at this point
Copy the full SHA e17ab30View commit details
Commits on Jan 6, 2024
-
Refactor import and adjust request handling in server
The User import was updated in apollo.ts to reflect its new location. In index.ts, the Fastify request import was expanded to enable a fleshed out request handler for 'multipart' content types. In fastify-ws.ts, the handling of 'multipart' requests was refined and moved to occur earlier in the preValidation hook. This helps ensure that multipart requests, notably for file uploads, are processed properly across the application.
Configuration menu - View commit details
-
Copy full SHA for 4587e02 - Browse repository at this point
Copy the full SHA 4587e02View commit details
Commits on Jan 7, 2024
-
Add caching to handle user authentication
A new caching mechanism has been introduced using NodeCache to handle user authentication and reduce database queries. The changes refactored the authentication process in the backend by moving the user authentication from Apollo and Fastify-WS to Fastify hooks. This change facilitates more efficient request handling in the server, improving performance. Furthermore, a new utility function, `hash`, is added to aid in creating cache keys.
Configuration menu - View commit details
-
Copy full SHA for 3eceb03 - Browse repository at this point
Copy the full SHA 3eceb03View commit details -
Refactor hocuspocus-server.ts and add caching
The code refactor primarily targets improving readability by breaking the server configuration into discrete functions. Additionally, a cache mechanism has been introduced for token verification process. This adjustment aims to boost performance by reducing redundant requests to JWT verification API whenever a valid token is presented.
Configuration menu - View commit details
-
Copy full SHA for 3b7d5f7 - Browse repository at this point
Copy the full SHA 3b7d5f7View commit details -
Update fetch and store methods in hocuspocus-server
Added type annotations to 'fetch' and 'store' methods in hocuspocus-server.ts. Additionally, simplified a condition check in 'store' method for 'issueComment' entityType.
Configuration menu - View commit details
-
Copy full SHA for d44da4b - Browse repository at this point
Copy the full SHA d44da4bView commit details -
Refactor hocuspocus-server.ts for better typing and exception handling
The code updates in hocuspocus-server.ts include the usage of types for better data handling and enhanced exception handling. It also includes changing the way JWT is verified with the addition of the VerifyJwtResponse type for more precise data extraction. Improvements finalize on refining the user fetching process from the database using the User type.
Configuration menu - View commit details
-
Copy full SHA for 9de6b7e - Browse repository at this point
Copy the full SHA 9de6b7eView commit details -
Refactor Backend DB Models and Adjust Resolvers
Optimized Sequelize usage by using the `init` function instead of `define` in backend database models. This improvement led to more strict TypeScript typings, which increases code stability and makes development easier. Naming conventions were also adjusted for better semantic clarity. Manual updates on model associations and import paths were done accordingly. Resolvers were then adjusted to match the updated models.
Configuration menu - View commit details
-
Copy full SHA for c392605 - Browse repository at this point
Copy the full SHA c392605View commit details -
Refactor Backend DB Models and Adjust Resolvers
Optimized Sequelize usage by using the `init` function instead of `define` in backend database models. This improvement led to more strict TypeScript typings, which increases code stability and makes development easier. Naming conventions were also adjusted for better semantic clarity. Manual updates on model associations and import paths were done accordingly. Resolvers were then adjusted to match the updated models.
Configuration menu - View commit details
-
Copy full SHA for 3bf56d8 - Browse repository at this point
Copy the full SHA 3bf56d8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9b1233b - Browse repository at this point
Copy the full SHA 9b1233bView commit details -
Update ESLint config file reference for backend
The ESLint configuration file for the backend has been renamed from .eslintrc to .eslintrc.json. Consequently, the reference to this file in .lintstagedrc has been updated to reflect this change.
Configuration menu - View commit details
-
Copy full SHA for 773beb3 - Browse repository at this point
Copy the full SHA 773beb3View commit details -
Update optional properties to CreationOptional
Several properties across different models in `backend/src/db/models/types.ts` have been updated to use `CreationOptional`. This change provides better clarity that these properties can be undefined during instance creation. Additionally, the build script in `backend/package.json` has been simplified and the unnecessary `--resolve-extensions=.js` flag removed.
Configuration menu - View commit details
-
Copy full SHA for bcbd47f - Browse repository at this point
Copy the full SHA bcbd47fView commit details
Commits on Jan 8, 2024
-
Add GraphQL code generation configuration and generated types
This commit introduces a new `codegen.ts` file for configuring GraphQL code generation using `@graphql-codegen/cli`. Besides, it includes a large set of generated TypeScript types for existing GraphQL queries, mutations, and input types. This supports better type safety and autocompletion when working with GraphQL on the backend.
Configuration menu - View commit details
-
Copy full SHA for 68449cd - Browse repository at this point
Copy the full SHA 68449cdView commit details -
Update package versions in pnpm-lock.yaml
The versions of '@graphql-codegen/cli', '@graphql-codegen/typescript', '@graphql-codegen/typescript-resolvers', and '@babel/traverse' have been fixed and updated in the pnpm-lock.yaml. The changes remove the range (caret) from the version specification, which ensures that the exact listed versions are used, improving the reliability of the build process.
Configuration menu - View commit details
-
Copy full SHA for 298b332 - Browse repository at this point
Copy the full SHA 298b332View commit details -
Update import statements and enhance linting
The code has been refactored to enhance TypeScript type safety by changing import statements to import type where applicable. Linting scripts have been updated with the integration of 'oxlint' and 'eslint'. This leads to improved code quality and adherence to coding standards. Additionally, the 'hocuspocus-server.ts' file has been refactored to improve the overall readability of the code.
Configuration menu - View commit details
-
Copy full SHA for 226952a - Browse repository at this point
Copy the full SHA 226952aView commit details -
Add '@types/uuid' to backend dependencies
The type definitions for 'uuid' have been added to the project's backend dependencies. This addition is visible in both package.json and pnpm-lock.yaml files, ensuring consistency and addressing possible type checking needs for 'uuid' in the backend.
Configuration menu - View commit details
-
Copy full SHA for 11d690f - Browse repository at this point
Copy the full SHA 11d690fView commit details -
Remove unused dependencies from pnpm-lock.yaml
The 'module-alias', 'sharp', and '@types/module-alias' dependencies along with their related entries have been deleted from the pnpm-lock.yaml file. This commit also includes the removal of several additional subdependencies, improving the project's overall dependency management and reducing the install size.
Configuration menu - View commit details
-
Copy full SHA for 261c308 - Browse repository at this point
Copy the full SHA 261c308View commit details
Commits on Jan 9, 2024
-
The file 'backend/src/__generated__/resolvers-types.ts' was deleted. This file was auto-generated and used types definitions for GraphQL resolvers. Its removal suggests a clean up or a change in the approach for handling schema and type definitions.
Configuration menu - View commit details
-
Copy full SHA for 86d0dfc - Browse repository at this point
Copy the full SHA 86d0dfcView commit details
Commits on Jan 10, 2024
-
Update backend dependencies and refactor resolvers
Dependencies for the backend have been updated with the addition of "dataloader-sequelize". Also, the code for resolving graphql queries in the backend has been refactored to improve readability and maintainability. This includes the use of database calls for fetching data and using a custom "Date" scalar for date values in the graphql schema.
Configuration menu - View commit details
-
Copy full SHA for fe4cafa - Browse repository at this point
Copy the full SHA fe4cafaView commit details
Commits on Jan 11, 2024
-
Refactor resolvers and types with Date to DateTime scalar
This update changes 'Date' to 'DateTime' across GraphQL resolvers and generated types. The code now utilizes 'graphql-scalars' for the DateTime scalar implementation, resulting in improved clarity and consistency. The 'Date' scalar used previously was manually crafted hence changed for better clarity and functionality. Several query and mutation resolvers are updated to accommodate this change.
Configuration menu - View commit details
-
Copy full SHA for f6f3200 - Browse repository at this point
Copy the full SHA f6f3200View commit details -
Convert IDs to numbers across multiple resolvers
The identifiers used in project/index, issue-comment/index, board/index and user/index resolvers have been converted to numbers. This change aids in uniformity and prevents potential type-related bugs. Resolvers are also updated to use DataLoader for caching, reducing the number of database queries executing a significant performance enhancement.
Configuration menu - View commit details
-
Copy full SHA for b9446c4 - Browse repository at this point
Copy the full SHA b9446c4View commit details -
Import and use AssetModel in user resolver
AssetModel is now being imported into the user resolver in the backend. This has been used to properly type the variable findOldAvatarAsset. This will ensure more accurate and safer type-checking within the resolvers.
Configuration menu - View commit details
-
Copy full SHA for a34fd23 - Browse repository at this point
Copy the full SHA a34fd23View commit details -
Refactor data mapping and date handling in resolvers and frontend com…
…ponents This commit focuses on two main changes to the codebase. First, it streamlines the way data is mapped from database queries in resolver functions - unnecessary array spreads are removed, simplifying the array returns. Secondly, it modifies how dates are handled in a number of frontend components to use 'DateTime.fromISO' instead of 'DateTime.fromMillis', reflecting the way dates are stored and returned from the backend.
Configuration menu - View commit details
-
Copy full SHA for 34e0132 - Browse repository at this point
Copy the full SHA 34e0132View commit details -
Refactor resolver logic in multiple files
Removed 'include' query parameter from the project resolver to simplify the database query. Updated the issue resolver to handle issueId as a Number type to ensure correct issue-board relationship. Modified the board resolver to fetch issues from viewState and handle data accordingly. These changes help improve code maintainability and consistency.
Configuration menu - View commit details
-
Copy full SHA for be1e254 - Browse repository at this point
Copy the full SHA be1e254View commit details -
Extend MyWebSocket interface and refactor usage
The MyWebSocket interface has been extended by adding 'id', 'user', and 'namespace' optional properties. Following this extension, the way connection sockets are handled in the 'wsServer.handleConnection' method was also refactored. Instead of directly injecting the properties into the socket, a separate handleConnectionSocket object was created, which then gets passed to the method.
Configuration menu - View commit details
-
Copy full SHA for dd0fa32 - Browse repository at this point
Copy the full SHA dd0fa32View commit details
Commits on Jan 12, 2024
-
Refactor websocket handler in Fastify server
The handshake connection and message handling is now encapsulated within a separate `wsPlugin` function. This streamlines the main `fastifyWsHandler` function by allowing it to focus on fastify-specific configuration and registration tasks, improving code readability and maintainability.
Configuration menu - View commit details
-
Copy full SHA for ee766c3 - Browse repository at this point
Copy the full SHA ee766c3View commit details