-
-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Several improvements incl GraphQL option & addtl called detection #48
Several improvements incl GraphQL option & addtl called detection #48
Conversation
using `foo.bar &&= baz` now counts as calling the base `foo.bar=` method.
I believe most of these changes are general improvements that should serve all users of this gem and ideally this PR should be merged reasonably as soon as possible. Anything I need to change before a merge would be accepted? |
I'm poking at this... |
I'm not convinced that the graphql part "fits"... I'm trying to think up a means to make debride more configurable, but even with sexp_processor's pattern matching, that's hard to do flexibly... |
For sure. I originally wanted to make debride more extensible with custom matchers and things but that ended up being more complicated. Instead I went with the simpler approach which was to follow the existing pattern for the I do think making the library more open to extension / plugins would be ideal though. I really like Jeremy Evans' plugin pattern, described here https://janko.io/the-plugin-system-of-sequel-and-roda/ |
next unless Sexp === block | ||
next unless block.sexp_type == :lit | ||
called << block.last | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not def process_block_pass
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
damnit... apparently I wrote this a long time ago... never submitted I guess. I've moved this and a bit more over to their own processor methods.
|
||
GRAPHQL_OBJECT_METHODS = [ | ||
:field, | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm punting on this stuff for now so I can get SOMETHING out
OK. I've added 80+% of this w/ some refactoring / moving to |
Cool. Will open a new issue about extension system. In the future if it's not too much to ask, please consider using commits from contributors instead of fully redoing the work. Many people enjoy getting that contributor badge & status. Thanks! |
Adds a bunch of extra
called
detection which should benefit all users of this gem.Also adds an option
--graphql
to handle the graphql-ruby behavior:the default resolution behavior for a field called
name
is to invoke thename
method on the object.