Trouble declaring associations #16519
Replies: 1 comment
-
nevermind omg I wasn't importing the models from the index with the sequelize magic attached, i was importing them directly from the model files! ohhhh my god why did I ever get into software engineering |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey folks, I think my file structure is goofy as hell on my current experiment. I am firmly a frontend dev venturing to unfamiliar places, and I would love some advice.
I am under the impression my Sequelize setup has gone awry somewhere, but I'm too inexperienced to know exactly where.
My project is using Node, Sequelize, Graphql + Apollo and Postgres. Please see the code here: https://github.com/lemonphresh/groceryGPT_graphql/tree/further_auth
I'm just trying to set up a simple one-to-many relationship between Users and Ingredients; Users will have many Ingredients. Every time I try to run
getUserIngredientsList
(found inresolvers/users
) it barks at me:Ingredient is not associated to User!
.Is something weird? Or rather, what all is weird here?
Beta Was this translation helpful? Give feedback.
All reactions