-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
[api] TypeScript API Bugs and Proposed Solutions #1131
Comments
Thanks for reporting this, I will get it fixed. |
@pinghe This is now fixed. I have dramatically improved the ergonomics of the TS API. For example there are many wrappers now that lets you use the native TS types without the need to specify the full JSON represenation (still possible though). Similarly many functions that required array now can accept single param as well that will be internally made into an array. Lastly and most importantly I have made it so that client is no longer global and can be instantiated as many times as needed with possibly different hosts / logins. I have also added As part of this I have also significantly revamped and improved on the API testing but please let me know if you encounter any issues! |
@agnesoft Thank you. I will update to the latest version and verify it in the near future. |
I've identified a few bugs in our TypeScript API implementation that need to be addressed. Below are the issues and my proposed solutions for each:
Bug 1: Axios baseURL Not Set
Issue: The axios instance is not configured with a baseURL, which causes issues when a custom prefix is set and needs to take effect.
Proposed Solution: In client.ts, set the baseURL for the axios configuration as follows:
Bug 2: InsertNodesBuilder Not Passing IDs
Issue: The InsertNodesBuilder is not passing ids, which results in them not being effective.
Proposed Solution: In query_builder.ts, modify the ids method to ensure ids are passed correctly:
And update the InsertNodesIdsBuilder class constructor to handle undefined data properly:
Bug 3: InsertEdgesBuilder Has Similar Issue as Bug 2
Issue: The InsertEdgesBuilder faces the same problem as InsertNodesBuilder where ids are not being passed effectively.
Proposed Solution: In query_builder.ts, adjust the ids method for InsertEdgesBuilder similar to the solution for InsertNodesBuilder:
Ensure the InsertEdgesIdsBuilder class is correctly handling the query data:
I believe these solutions will resolve the current bugs and improve the stability and functionality of our API.
Thank you for your review and consideration.
Best regards,
pinghe
The text was updated successfully, but these errors were encountered: