-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: create interface and types for resident #18
Conversation
@ssreekar Can you try testing this from Postman or something. |
So I ran these changes and tested them via Postman. In order to get it to work I made changes to the code base which I migrated. FYI I generally made the simplest change to get the Postman to work rather than the 'smart' solution, because I didn't want to override the design changes you guys made. You can take a look at the latest commit to see the exact change but as an overview: Made Model Naming Consistent I also changed DateTime and Date to String in the GraphQL Schema, as they support Date or DateTime. I also added a TODO to fix this in the future where we can either use third party handlers or manually handle them in the backend. Discrepancies between optional types in the Prisma model and the optional types in the Schema Model. ID's from GraphQL Schema are considered strings but on Prisma side they are considered ints so I just added a parseInt() Changed output of DeleteResident to ResidentDTO instead of ID (i think this was a typo but not 100% sure) Changed input of schemaType for residentByID to [ID!] and made both return types for residentsById and allResidents Other than that the PR looks great and works when tested 😄 Most of the changes I made had to do with getting the code simply running as you guys had no way to test your code, but once it started working everything worked great. @williamtran10 Thoughts? (Specifically wanted your opinion on snake vs camel casing since that impacts the entire data model) and whether we should use third party date time types vs backend string checks) |
Re: Case naming consistency Re: DateTime Re: IDs as ints |
@williamtran10 |
…ueprint/marillac-place into nandini-selena/resident-api
So everything works up till commit 331d0ff. Then I tried to get the changes from dev with a rebase, led to resolving a conflict with the dev branch and I don't think I rebased things correctly, now it doesn't build on my end and I can't figure out how to fix it. @NandiniMeh can you please have a look? |
* feat: add neon db * fix: add optional neon setup
321ee19
to
01940de
Compare
…ueprint/marillac-place into nandini-selena/resident-api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NandiniMeh @selena1108 Can you double check that this works? I changed the name mapping and linting. Added some comments too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left some small comments regarding casing and references
I added some changes regarding the types of the resident graph ql schema to be camelCase and some other minor changes to get the apis to run via postman. I also added graphql scalars third party Library so we can now use Datetime and Date time in the graph ql schema file. I'm not 100% sure how exactly the model should work with Date and DateTime, so feel free to update the resdient schema types so that they make more sense. |
…ueprint/marillac-place into nandini-selena/resident-api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, squash and merge when you're ready.
Notion ticket link
Resident API Backend - CRUD
Implementation description
Steps to test
What should reviewers focus on?
Checklist