Michigan-Tech-Courses / rate-my-professors

a basic wrapper for Rate My Professors's GraphQL API
MIT License
11 stars 9 forks source link

Improved Error Handling for Queries, Simplified Logic, and Formatted README #21

Open spabolu opened 1 year ago

spabolu commented 1 year ago

In this pull request, I have implemented several enhancements to the existing codebase, focusing on error handling for queries, simplifying logic, and reformatting the README page for better readability and understanding. Although I have limited experience with TypeScript, I have tried my best to contribute positively to the project. I also plan to potentially add a feature for retrieving an array of reviews in the future once I learn more TypeScript. Any feedback or suggestions for further improvements are highly appreciated.

List of Changes: Error Handling: Added comprehensive error handling for queries to ensure the application can handle unexpected issues gracefully. This includes checking for malformed queries, unreachable data sources, and other possible errors that could arise during execution.

Simplified Logic: Reviewed and refactored the existing logic in the codebase to make it more efficient, readable, and maintainable. This will help other contributors to easily understand and build upon the code in the future.

README Reformatting: Restructured the README page to make it more user-friendly and informative. This includes adding clear headings and sections, improving the formatting of code snippets, and providing more context about the project and its features.

Future Plans: I plan to add a new query feature for retrieving an array of reviews in the future, as it can help users access more detailed information about a particular product or service. I am open to any suggestions or advice on how to approach this feature.

Contributor Experience: As someone with limited TypeScript experience, I would like to acknowledge that there may be room for further improvements in my contributions. I am eager to learn and grow, so please feel free to provide any feedback or suggestions to help me enhance my TypeScript skills and contribute better to this project.

spabolu commented 1 year ago

Hi, I am not sure how to push the new code to the existing issue. I made another pull request with all the changes and an additional change to the URL.

spabolu commented 1 year ago

Okay, I pushed the new code. I added changes to the URL by adding the URL as a proxy in package.json. I am hoping this would fix the problem with running the package in frontend applications. Also, I changed the README file with the changes we discussed. Let me know what you think.

spabolu commented 1 year ago

Looks like the changes seem accurate. We can leave the Promise.reject as it is because it doesn't bring any issues. The README is functional and I would say we can try adding the proxy to see if it can benefit frontend applications. Is it possible to merge the changes?

spabolu commented 1 year ago

Do you know what the conflicts are? I don't have write access to fix it, so can you look into it?