Glavin001 / graphql-sequelize-crud

Automatically generate queries and mutations from Sequelize models
https://www.npmjs.com/package/graphql-sequelize-crud
MIT License
128 stars 23 forks source link

graphql-sequelize: Include support has been removed #14

Closed pchipel1 closed 7 years ago

pchipel1 commented 8 years ago

Brilliant work on graphql-sequelize-crud! Looking to make use of this package with latest graphql (v0.7.2) and graphql-sequelize (v4.0.0) updates, but when attempting to run graphql-sequelize-crud Demo after updates get AssertionError: "Include support has been removed in favor of dataloader batching".

Error arises from: graphql-sequelize\lib\resolver.js:41:24 (https://github.com/mickhansen/graphql-sequelize/search?utf8=%E2%9C%93&q=%22Include+support+has+been+removed+in+favor+of+dataloader+batching%22)

After loading dataloader-sequelize package get same error. Have not looked far into a solution, but as you are likely already aware of the issue, was wondering if graphql-sequelize-crud will be updated for graphql-sequelize (v4.0.0)?

pchipel1 commented 8 years ago

Note: After removing all instances of include: false property from resolver functions in src/index.js the Demo runs again without issue. There was a comment in src/index.js that include was set to false to disable auto including of associations based on AST - default: true. While the Demo now works again are there other implications of include support being removed from graphql-sequelize in favor of the dataloader-sequelize package that need to be considered?

Glavin001 commented 7 years ago

Pull Request #15 has been merged. Hope that helps!

jblank46 commented 7 years ago

Hi,

First off, awesome job on this! Even though I had it running, I was getting sick of figuring out relay. Heads up, I pulled the package from npm and it still has the include: false properties in its lib/index.js file. I ran into this same error, modified my local copy and got up and running fairly quickly. I see the github version is modified, so not sure what to make of that.

Thanks!

Glavin001 commented 7 years ago

Thanks for the reminder, @jblank46. I need to publish latest to npm.

Glavin001 commented 7 years ago

Published v0.3.0