Option to coerce "null" to Ruby nil#158
Merged
richmolj merged 1 commit intoJun 13, 2019
Merged
Conversation
richmolj
reviewed
Jun 12, 2019
richmolj
left a comment
Contributor
There was a problem hiding this comment.
I love you for this PR ❤️ 😃 ! Thank you!
My only thought is validating this will work for other types than strings (particularly hash, though not the biggest deal). Seems like it would, but maybe a test on age would be helpful?
| @@ -53,6 +53,7 @@ def each_filter | |||
| type = Types[filter.values[0][:type]] | |||
| unless type[:canonical_name] == :hash || !value.is_a?(String) | |||
Contributor
There was a problem hiding this comment.
Seems like this would not apply to hash types - would it be possible to move out of this block so all types could support null?
79a1383 to
5c7087c
Compare
Contributor
Author
|
@richmolj changes made. |
zeisler
added a commit
to zeisler/graphiti-api.github.io
that referenced
this pull request
Jun 12, 2019
zeisler
added a commit
to zeisler/graphiti-api.github.io
that referenced
this pull request
Jun 12, 2019
Contributor
|
Great stuff 🎉 ! If you could add to |
acf70e3 to
4e32763
Compare
Contributor
Author
|
@richmolj change log added. |
Contributor
|
Thanks @zeisler, you rock ❤️ There's a conflict I can't fix though GH atm, but if you can resolve I'm ready to merge. |
Filters have new options `allow_nil: true` Option can be set at the resource level `Resource.filters_accept_nil_by_default = true` By default this is set to false. graphiti-api#142
4e32763 to
99f5d9d
Compare
Contributor
Author
|
@richmolj resolved. |
richmolj
pushed a commit
to graphiti-api/graphiti-api.github.io
that referenced
this pull request
Aug 8, 2019
* Allow "null" to be passed in filters Docs for PR graphiti-api/graphiti#158 * Update guides/concepts/resources.md Grammar fix
richmolj
pushed a commit
to graphiti-api/graphiti-api.github.io
that referenced
this pull request
Apr 9, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Filters have new options
allow_nil: trueOption can be set at the resource level
Resource.filters_accept_nil_by_default = trueBy default this is set to false.
#142