Closed mubaidr closed 5 years ago
Your setup looks correct. It's failing in the shimModel code which is odd, apparently it's being passed an undefined Model, my best guess is one of your associations is defined incorrectly
Interesting. But when I disable dataloader-sequelize
context, graphql api works fine. (which means, i think, all models and relationships are defined correctly?) 🤔
Also, what do you recommend to further debug this issue?
Hmm actually, looking at the line of code likely being hit here: https://github.com/mickhansen/dataloader-sequelize/blob/master/src/index.js#L474
What version of Sequelize are you using?
Ohh. Right now its on v5 beta.
I will test this with v4 and will report back. Thanks
It should work for v5 too, looking at the code, but i'm personally still on v3 so
@mickhansen Yup, that was it, sorry to bother you. Downgraded to v4; graphql api now seems to work. and I can confirm that dataloader-sequelize
is working too, there is some noticeable difference in response time for nested query.
Thanks for your awesome work and support. 👍
I'd appreciate if you could test why that regex doesn't work @mubaidr and potentially provide a fix :)
Hmm Will try that. 👍
There are conflicting documentation by both repositories on how to integrate
dataloader-sequelize
withgraphql-sequelize
.I tried following the example project
graphql-yoga
, but there is an error when running any query:and response from query:
Server starting file: https://github.com/mubaidr/ors-node-graphql.js/blob/master/api/index.js#L21
GraphQl schema loading code: https://github.com/mubaidr/ors-node-graphql.js/blob/master/api/db/graphQl.js#L19
Can somebody guide me how to do it?