Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfix: avoid
TypeError
on not: {not: {anyOf: [...]}}
.
We have special handling for double nots to "pull up" the filter clauses for greater efficiency. That handling didn't work right when an `anyOf` was under the double `not`, and we got a `TypeError`: ``` TypeError: no implicit conversion of Integer into Array from elastic_graph/graphql/filtering/filter_interpreter.rb:121:in `concat' from elastic_graph/graphql/filtering/filter_interpreter.rb:121:in `block (2 levels) in process_not_expression' from elastic_graph/graphql/filtering/filter_interpreter.rb:121:in `each' from elastic_graph/graphql/filtering/filter_interpreter.rb:121:in `block in process_not_expression' from elastic_graph/graphql/filtering/filter_interpreter.rb:120:in `each' from elastic_graph/graphql/filtering/filter_interpreter.rb:120:in `process_not_expression' from elastic_graph/graphql/filtering/filter_interpreter.rb:66:in `block in process_filter_hash' from elastic_graph/graphql/filtering/filter_interpreter.rb:61:in `each' from elastic_graph/graphql/filtering/filter_interpreter.rb:61:in `process_filter_hash' from elastic_graph/graphql/filtering/filter_interpreter.rb:43:in `block (2 levels) in build_query' from set.rb:511:in `each_key' from set.rb:511:in `each' from elastic_graph/graphql/filtering/filter_interpreter.rb:42:in `block in build_query' from <internal:kernel>:90:in `tap' from elastic_graph/graphql/filtering/filter_interpreter.rb:337:in `build_bool_hash' from elastic_graph/graphql/filtering/filter_interpreter.rb:41:in `build_query' from elastic_graph/graphql/datastore_query.rb:318:in `to_datastore_body' from elastic_graph/graphql/datastore_query.rb:229:in `empty?' from elastic_graph/graphql/datastore_query.rb:94:in `each' from elastic_graph/graphql/datastore_query.rb:94:in `partition' from elastic_graph/graphql/datastore_query.rb:94:in `perform' from elastic_graph/graphql/datastore_search_router.rb:34:in `msearch' from elastic_graph/graphql/resolvers/query_source.rb:26:in `fetch' from graphql/dataloader/source.rb:136:in `run_pending_keys' from graphql/dataloader.rb:294:in `block (2 levels) in spawn_source_fiber' from graphql/dataloader.rb:292:in `each' from graphql/dataloader.rb:292:in `block in spawn_source_fiber' from graphql/dataloader.rb:245:in `block in spawn_fiber' ``` This fixes that case.
- Loading branch information