frankcollins3 / Next-Water-App

Happy, Healthy Water Cycling App that tracks user/human fluid intake.
https://next-water-app.vercel.app
1 stars 0 forks source link

interface discrepancy [11:40pm] #86

Closed frankcollins3 closed 11 months ago

frankcollins3 commented 11 months ago

attempting to do: make SettingsInterface for the prisma.settings.findMany() return data object

error: Screen Shot 2023-07-22 at 7 44 23 PM Screen Shot 2023-07-22 at 11 39 15 PM Screen Shot 2023-07-22 at 11 39 43 PM

proposed approach: move interface to be the object once it's met by traversing the object endpoint API to bring then object to have same endpoints

// the data is: mySettings.data.data.userSettings (userSettings being the graphQL resolver function name and data being the data from Prisma promise within that resolver) if a data endpoint is added to the interface it probably needs an object { data } to even work. sounds like tailchasing🐩

frankcollins3 commented 11 months ago

mySettings:SettingsInterface = mySettings.data.data.userSettings

'SettingsInterface' only refers to a type, but is being used as a value here.ts(2693) any

[11:44pm]

frankcollins3 commented 11 months ago

👍 :any (for now) [11:48pm]