Closed vfonic closed 4 years ago
I think this should be added to README. Because I don't want to force autoloading things which won't be used from search object to the users.
I find it very rare that gems don't autoload main files/constants. Isn't the whole idea of gem 'gem_name', require: false
to opt-in for not autoloading things?
Yes, the but most people don't think about this and get a lot of unneeded coded. I know it is a bit inconvenient. Will update README to explain this.
Thanks for mentioning it.
You're right. Most people probably do that. Me included. :)
I think the expectation of a ruby gem would be for it to get required when specified without require: false
. That would be the most common solution. I'd make it so that the gem does autoload, and add to README instructions how to disable autoloading.
Either way, thanks for looking into this!
✅Updated the README
The naming convention for option declaration needs some love. I just killed 3 hours because the example has them camelCase and they'd only run when snake_case. That said, love the plugin! Well done.
@ItsRhen sorry that this happened. Which example you are referring to and how do you think we can improve on this example?
I've had some issues making SearchObject work with resolver.
For some unexplicable reason neither SearchObject nor SearchObjectGraphQL were loaded.
After adding these two requires on top of my resolver, the search finally worked.
Here's the full source code for resolver:
One thing to note:
from_date
is visible asfromDate
argument in GraphQL schema. This is what I want, but just something to keep in mind.@RStankov do you think anything from here should be added to the README.md? Or perhaps the gem should autoload the missing constants/modules?
I'm using rails (5.2.3) and graphql (1.9.9).
PS I don't use 'spring' gem in my app.