ConsultingMD / graphql-preload

Preload ActiveRecord associations with graphql-batch
MIT License
139 stars 66 forks source link

preload is not working with class based syntax #36

Open PriyankaRPathak opened 4 years ago

PriyankaRPathak commented 4 years ago

Hi, I'm using rails 4.1.16 and ruby 2.3.8 in my application. Converting DSL to class based syntax cause issue as it throws below error.

preload is undefined.

Can anyone suggest alternate option?

atatarenko commented 4 years ago

I was able to continue using the gem by changing the way how it's included in the Gemfile, see https://github.com/ConsultingMD/graphql-preload/issues/33.

PriyankaRPathak commented 4 years ago

Have you found any straightforward documentation to convert DSL => class based syntax for each type?

atatarenko commented 4 years ago

Yeah, I found one, here it is – https://graphql-ruby.org/schema/class_based_api.html