elasticgraph-schema_definition 0.18.0.5 → 0.19.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7bb25d1889af5a97e059d9e3f676b0b3afa2bb42d3669f26a3185edf9a931744
4
- data.tar.gz: b7a7a8f7dbb7992925aedb81aa75e12581966f0b2012e831162719fbd4e985f1
3
+ metadata.gz: 566acd1285a0695abc958470fd5e44c3f899be795e8fe2d676d8248d36eadaed
4
+ data.tar.gz: d8c11fcbadf68f590edd48bc98e7b71205b5b3c0d568ed472e2038327454b948
5
5
  SHA512:
6
- metadata.gz: 98d5092178638c639a5e17207d74533db9de54bc423ae7e5889dd0ae8b1db9e41446d9f516dcdcad9306cf48310a51f14f19edbd0aac55670ad393f8bee51579
7
- data.tar.gz: d55858c4a7bba00679c6bbc07ee2f1a8d3820858eb2d5b3e5d1855d4acba9829b3cefa540bdfce3143d341949bb24677cb00c87d5c236963e4c0f219e2102434
6
+ metadata.gz: fae9efdac61ce3635aafd103ba90fad8f3752e8e36150e4099885ae92764f5bd16e5d0becbd97de75c99fc30a3d56840c0ba393fbaf3a7b6a30e4d9e06c46b4c
7
+ data.tar.gz: 8bede22cfd83aa8fbf39b7a14b50967b9f1d97fa38039748788fe79675ffc827b9bf637a12328f4eda597c4cb8fa1fda6b93f2a0bb1bfe18d3a391184289a90a
@@ -16,7 +16,7 @@ ElasticGraphGemspecHelper.define_elasticgraph_gem(gemspec_file: __FILE__, catego
16
16
  spec.add_dependency "elasticgraph-json_schema", eg_version
17
17
  spec.add_dependency "elasticgraph-schema_artifacts", eg_version
18
18
  spec.add_dependency "elasticgraph-support", eg_version
19
- spec.add_dependency "graphql", "~> 2.3.14"
19
+ spec.add_dependency "graphql", "~> 2.4.5"
20
20
  spec.add_dependency "rake", "~> 13.2"
21
21
 
22
22
  spec.add_development_dependency "elasticgraph-admin", eg_version
@@ -141,7 +141,7 @@ module ElasticGraph
141
141
  t.documentation <<~EOS
142
142
  Input type used to specify filters on `#{source_type}` fields.
143
143
 
144
- Will be ignored if passed as an empty object (or as `null`).
144
+ Will match all documents if passed as an empty object (or as `null`).
145
145
  EOS
146
146
 
147
147
  t.field @state.schema_elements.any_of, "[#{t.name}!]" do |f|
@@ -149,17 +149,17 @@ module ElasticGraph
149
149
  Matches records where any of the provided sub-filters evaluate to true.
150
150
  This works just like an OR operator in SQL.
151
151
 
152
- Will be ignored when `null` is passed. When an empty list is passed, will cause this
153
- part of the filter to match no documents.
152
+ When `null` is passed, matches all documents.
153
+ When an empty list is passed, this part of the filter matches no documents.
154
154
  EOS
155
155
  end
156
156
 
157
157
  t.field @state.schema_elements.not, t.name do |f|
158
158
  f.documentation <<~EOS
159
- Matches records where the provided sub-filter does not evaluate to true.
159
+ Matches records where the provided sub-filter evaluates to false.
160
160
  This works just like a NOT operator in SQL.
161
161
 
162
- Will be ignored when `null` or an empty object is passed.
162
+ When `null` or an empty object is passed, matches no documents.
163
163
  EOS
164
164
  end
165
165
 
@@ -303,7 +303,7 @@ module ElasticGraph
303
303
  f.documentation <<~EOS
304
304
  Matches records where any of the list elements match the provided sub-filter.
305
305
 
306
- Will be ignored when `null` or an empty object is passed.
306
+ When `null` or an empty object is passed, matches all documents.
307
307
  EOS
308
308
  end
309
309
 
@@ -315,7 +315,7 @@ module ElasticGraph
315
315
  be provided on a single `#{t.name}` input because of collisions between key names. For example, if you want to provide
316
316
  multiple `#{any_satisfy}: ...` filters, you could do `#{all_of}: [{#{any_satisfy}: ...}, {#{any_satisfy}: ...}]`.
317
317
 
318
- Will be ignored when `null` is passed or an empty list is passed.
318
+ When `null` or an empty list is passed, matches all documents.
319
319
  EOS
320
320
  end
321
321
 
@@ -330,7 +330,7 @@ module ElasticGraph
330
330
  t.documentation <<~EOS
331
331
  Input type used to specify filters on elements of a `[#{source_type}]` field.
332
332
 
333
- Will be ignored if passed as an empty object (or as `null`).
333
+ Will match all documents if passed as an empty object (or as `null`).
334
334
  EOS
335
335
 
336
336
  # While we support `not: {any_satisfy: ...}` we do not support `any_satisfy: {not ...}` at this time.
@@ -374,7 +374,7 @@ module ElasticGraph
374
374
  or transitively from a list field that has been configured to index each leaf field as
375
375
  its own flattened list of values.
376
376
 
377
- Will be ignored if passed as an empty object (or as `null`).
377
+ Will match all documents if passed as an empty object (or as `null`).
378
378
  EOS
379
379
 
380
380
  source_type.graphql_fields_by_name.each do |field_name, field|
@@ -424,7 +424,7 @@ module ElasticGraph
424
424
  f.documentation <<~EOS
425
425
  Used to filter on the number of non-null elements in this list field.
426
426
 
427
- Will be ignored when `null` or an empty object is passed.
427
+ When `null` or an empty object is passed, matches all documents.
428
428
  EOS
429
429
  end
430
430
  end
@@ -216,7 +216,7 @@ module ElasticGraph
216
216
  f.documentation <<~EOS
217
217
  Matches records where the field value matches the provided value using full text search.
218
218
 
219
- Will be ignored when `null` is passed.
219
+ When `null` is passed, matches all documents.
220
220
  EOS
221
221
 
222
222
  f.directive "deprecated", reason: "Use `#{names.matches_query}` instead."
@@ -228,7 +228,7 @@ module ElasticGraph
228
228
  This is more lenient than `#{names.matches_phrase}`: the order of terms is ignored, and,
229
229
  by default, only one search term is required to be in the field value.
230
230
 
231
- Will be ignored when `null` is passed.
231
+ When `null` is passed, matches all documents.
232
232
  EOS
233
233
  end
234
234
 
@@ -238,7 +238,7 @@ module ElasticGraph
238
238
  full text search. This is stricter than `#{names.matches_query}`: all terms must match
239
239
  and be in the same order as the provided phrase.
240
240
 
241
- Will be ignored when `null` is passed.
241
+ When `null` is passed, matches all documents.
242
242
  EOS
243
243
  end
244
244
  end.each do |input_type|
@@ -246,7 +246,7 @@ module ElasticGraph
246
246
  input_type.documentation <<~EOS
247
247
  Input type used to specify filters on `#{field_type}` fields that have been indexed for full text search.
248
248
 
249
- Will be ignored if passed as an empty object (or as `null`).
249
+ Will match all documents if passed as an empty object (or as `null`).
250
250
  EOS
251
251
 
252
252
  register_input_type(input_type)
@@ -256,7 +256,7 @@ module ElasticGraph
256
256
  t.documentation <<~EOS
257
257
  Input type used to specify parameters for the `#{names.matches_query}` filtering operator.
258
258
 
259
- Will be ignored if passed as `null`.
259
+ When `null` is passed, matches all documents.
260
260
  EOS
261
261
 
262
262
  t.field names.query, "String!" do |f|
@@ -280,18 +280,30 @@ module ElasticGraph
280
280
 
281
281
  f.default false
282
282
  end
283
+
284
+ # any_of/not don't really make sense on this filter because it doesn't make sense to
285
+ # apply an OR operator or negation to the fields of this type since they are all an
286
+ # indivisible part of a single filter operation on a specific field. So we remove them
287
+ # here.
288
+ remove_any_of_and_not_filter_operators_on(t)
283
289
  end
284
290
 
285
291
  register_filter "MatchesPhrase" do |t|
286
292
  t.documentation <<~EOS
287
293
  Input type used to specify parameters for the `#{names.matches_phrase}` filtering operator.
288
294
 
289
- Will be ignored if passed as `null`.
295
+ When `null` is passed, matches all documents.
290
296
  EOS
291
297
 
292
298
  t.field names.phrase, "String!" do |f|
293
299
  f.documentation "The input phrase to search for."
294
300
  end
301
+
302
+ # any_of/not don't really make sense on this filter because it doesn't make sense to
303
+ # apply an OR operator or negation to the fields of this type since they are all an
304
+ # indivisible part of a single filter operation on a specific field. So we remove them
305
+ # here.
306
+ remove_any_of_and_not_filter_operators_on(t)
295
307
  end
296
308
 
297
309
  # This is defined as a built-in ElasticGraph type so that we can leverage Elasticsearch/OpenSearch GeoLocation features
@@ -329,7 +341,7 @@ module ElasticGraph
329
341
  Matches records where the field's geographic location is within a specified distance from the
330
342
  location identified by `#{names.latitude}` and `#{names.longitude}`.
331
343
 
332
- Will be ignored when `null` or an empty object is passed.
344
+ When `null` or an empty object is passed, matches all documents.
333
345
  EOS
334
346
  end
335
347
  end.each { |input_filter| register_input_type(input_filter) }
@@ -660,7 +672,11 @@ module ElasticGraph
660
672
  t.type_ref.as_list_element_filter_input.to_final_form(as_input: true).name
661
673
  ) do |ft|
662
674
  ft.field names.time_of_day, date_time_time_of_day_ref.as_filter_input.name do |f|
663
- f.documentation "Matches records based on the time-of-day of the `DateTime` values."
675
+ f.documentation <<~EOS
676
+ Matches records based on the time-of-day of the `DateTime` values.
677
+
678
+ When `null` is passed, matches all documents.
679
+ EOS
664
680
  end
665
681
  end
666
682
 
@@ -677,7 +693,7 @@ module ElasticGraph
677
693
  t.documentation <<~EOS
678
694
  Input type used to specify filters on the time-of-day of `DateTime` fields.
679
695
 
680
- Will be ignored if passed as an empty object (or as `null`).
696
+ Will match all documents if passed as an empty object (or as `null`).
681
697
  EOS
682
698
 
683
699
  fixup_doc = ->(doc_string) do
@@ -742,7 +742,7 @@ module ElasticGraph
742
742
  schema_def_state.factory.new_field(**params).tap do |f|
743
743
  f.documentation derived_documentation(
744
744
  "Used to filter on the `#{name}` field",
745
- "Will be ignored if `null` or an empty object is passed"
745
+ "When `null` or an empty object is passed, matches all documents"
746
746
  )
747
747
 
748
748
  filter_customizations.each { |c| c.call(f) }
@@ -200,33 +200,33 @@ module ElasticGraph
200
200
  Matches records where the field value is equal to any of the provided values.
201
201
  This works just like an IN operator in SQL.
202
202
 
203
- Will be ignored when `null` is passed. When an empty list is passed, will cause this
204
- part of the filter to match no documents. When `null` is passed in the list, will
205
- match records where the field value is `null`.
203
+ When `null` is passed, matches all documents. When an empty list is passed,
204
+ this part of the filter matches no documents. When `null` is passed in the
205
+ list, this part of the filter matches records where the field value is `null`.
206
206
  EOS
207
207
 
208
208
  GT_DOC = <<~EOS
209
209
  Matches records where the field value is greater than (>) the provided value.
210
210
 
211
- Will be ignored when `null` is passed.
211
+ When `null` is passed, matches all documents.
212
212
  EOS
213
213
 
214
214
  GTE_DOC = <<~EOS
215
215
  Matches records where the field value is greater than or equal to (>=) the provided value.
216
216
 
217
- Will be ignored when `null` is passed.
217
+ When `null` is passed, matches all documents.
218
218
  EOS
219
219
 
220
220
  LT_DOC = <<~EOS
221
221
  Matches records where the field value is less than (<) the provided value.
222
222
 
223
- Will be ignored when `null` is passed.
223
+ When `null` is passed, matches all documents.
224
224
  EOS
225
225
 
226
226
  LTE_DOC = <<~EOS
227
227
  Matches records where the field value is less than or equal to (<=) the provided value.
228
228
 
229
- Will be ignored when `null` is passed.
229
+ When `null` is passed, matches all documents.
230
230
  EOS
231
231
 
232
232
  def to_input_filters
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elasticgraph-schema_definition
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.0.5
4
+ version: 0.19.0.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Myron Marston
8
8
  - Ben VandenBos
9
- - Square Engineering
9
+ - Block Engineering
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2024-09-20 00:00:00.000000000 Z
13
+ date: 2024-12-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rubocop-factory_bot
@@ -46,42 +46,42 @@ dependencies:
46
46
  requirements:
47
47
  - - "~>"
48
48
  - !ruby/object:Gem::Version
49
- version: '3.0'
49
+ version: '3.1'
50
50
  type: :development
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - "~>"
55
55
  - !ruby/object:Gem::Version
56
- version: '3.0'
56
+ version: '3.1'
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: standard
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - "~>"
62
62
  - !ruby/object:Gem::Version
63
- version: 1.40.0
63
+ version: 1.41.0
64
64
  type: :development
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - "~>"
69
69
  - !ruby/object:Gem::Version
70
- version: 1.40.0
70
+ version: 1.41.0
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: steep
73
73
  requirement: !ruby/object:Gem::Requirement
74
74
  requirements:
75
75
  - - "~>"
76
76
  - !ruby/object:Gem::Version
77
- version: '1.7'
77
+ version: '1.8'
78
78
  type: :development
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
82
  - - "~>"
83
83
  - !ruby/object:Gem::Version
84
- version: '1.7'
84
+ version: '1.8'
85
85
  - !ruby/object:Gem::Dependency
86
86
  name: coderay
87
87
  requirement: !ruby/object:Gem::Requirement
@@ -136,14 +136,14 @@ dependencies:
136
136
  requirements:
137
137
  - - "~>"
138
138
  - !ruby/object:Gem::Version
139
- version: '0.12'
139
+ version: '0.13'
140
140
  type: :development
141
141
  prerelease: false
142
142
  version_requirements: !ruby/object:Gem::Requirement
143
143
  requirements:
144
144
  - - "~>"
145
145
  - !ruby/object:Gem::Version
146
- version: '0.12'
146
+ version: '0.13'
147
147
  - !ruby/object:Gem::Dependency
148
148
  name: simplecov
149
149
  requirement: !ruby/object:Gem::Requirement
@@ -240,84 +240,84 @@ dependencies:
240
240
  requirements:
241
241
  - - '='
242
242
  - !ruby/object:Gem::Version
243
- version: 0.18.0.5
243
+ version: 0.19.0.0.rc2
244
244
  type: :runtime
245
245
  prerelease: false
246
246
  version_requirements: !ruby/object:Gem::Requirement
247
247
  requirements:
248
248
  - - '='
249
249
  - !ruby/object:Gem::Version
250
- version: 0.18.0.5
250
+ version: 0.19.0.0.rc2
251
251
  - !ruby/object:Gem::Dependency
252
252
  name: elasticgraph-indexer
253
253
  requirement: !ruby/object:Gem::Requirement
254
254
  requirements:
255
255
  - - '='
256
256
  - !ruby/object:Gem::Version
257
- version: 0.18.0.5
257
+ version: 0.19.0.0.rc2
258
258
  type: :runtime
259
259
  prerelease: false
260
260
  version_requirements: !ruby/object:Gem::Requirement
261
261
  requirements:
262
262
  - - '='
263
263
  - !ruby/object:Gem::Version
264
- version: 0.18.0.5
264
+ version: 0.19.0.0.rc2
265
265
  - !ruby/object:Gem::Dependency
266
266
  name: elasticgraph-json_schema
267
267
  requirement: !ruby/object:Gem::Requirement
268
268
  requirements:
269
269
  - - '='
270
270
  - !ruby/object:Gem::Version
271
- version: 0.18.0.5
271
+ version: 0.19.0.0.rc2
272
272
  type: :runtime
273
273
  prerelease: false
274
274
  version_requirements: !ruby/object:Gem::Requirement
275
275
  requirements:
276
276
  - - '='
277
277
  - !ruby/object:Gem::Version
278
- version: 0.18.0.5
278
+ version: 0.19.0.0.rc2
279
279
  - !ruby/object:Gem::Dependency
280
280
  name: elasticgraph-schema_artifacts
281
281
  requirement: !ruby/object:Gem::Requirement
282
282
  requirements:
283
283
  - - '='
284
284
  - !ruby/object:Gem::Version
285
- version: 0.18.0.5
285
+ version: 0.19.0.0.rc2
286
286
  type: :runtime
287
287
  prerelease: false
288
288
  version_requirements: !ruby/object:Gem::Requirement
289
289
  requirements:
290
290
  - - '='
291
291
  - !ruby/object:Gem::Version
292
- version: 0.18.0.5
292
+ version: 0.19.0.0.rc2
293
293
  - !ruby/object:Gem::Dependency
294
294
  name: elasticgraph-support
295
295
  requirement: !ruby/object:Gem::Requirement
296
296
  requirements:
297
297
  - - '='
298
298
  - !ruby/object:Gem::Version
299
- version: 0.18.0.5
299
+ version: 0.19.0.0.rc2
300
300
  type: :runtime
301
301
  prerelease: false
302
302
  version_requirements: !ruby/object:Gem::Requirement
303
303
  requirements:
304
304
  - - '='
305
305
  - !ruby/object:Gem::Version
306
- version: 0.18.0.5
306
+ version: 0.19.0.0.rc2
307
307
  - !ruby/object:Gem::Dependency
308
308
  name: graphql
309
309
  requirement: !ruby/object:Gem::Requirement
310
310
  requirements:
311
311
  - - "~>"
312
312
  - !ruby/object:Gem::Version
313
- version: 2.3.14
313
+ version: 2.4.5
314
314
  type: :runtime
315
315
  prerelease: false
316
316
  version_requirements: !ruby/object:Gem::Requirement
317
317
  requirements:
318
318
  - - "~>"
319
319
  - !ruby/object:Gem::Version
320
- version: 2.3.14
320
+ version: 2.4.5
321
321
  - !ruby/object:Gem::Dependency
322
322
  name: rake
323
323
  requirement: !ruby/object:Gem::Requirement
@@ -338,56 +338,56 @@ dependencies:
338
338
  requirements:
339
339
  - - '='
340
340
  - !ruby/object:Gem::Version
341
- version: 0.18.0.5
341
+ version: 0.19.0.0.rc2
342
342
  type: :development
343
343
  prerelease: false
344
344
  version_requirements: !ruby/object:Gem::Requirement
345
345
  requirements:
346
346
  - - '='
347
347
  - !ruby/object:Gem::Version
348
- version: 0.18.0.5
348
+ version: 0.19.0.0.rc2
349
349
  - !ruby/object:Gem::Dependency
350
350
  name: elasticgraph-datastore_core
351
351
  requirement: !ruby/object:Gem::Requirement
352
352
  requirements:
353
353
  - - '='
354
354
  - !ruby/object:Gem::Version
355
- version: 0.18.0.5
355
+ version: 0.19.0.0.rc2
356
356
  type: :development
357
357
  prerelease: false
358
358
  version_requirements: !ruby/object:Gem::Requirement
359
359
  requirements:
360
360
  - - '='
361
361
  - !ruby/object:Gem::Version
362
- version: 0.18.0.5
362
+ version: 0.19.0.0.rc2
363
363
  - !ruby/object:Gem::Dependency
364
364
  name: elasticgraph-elasticsearch
365
365
  requirement: !ruby/object:Gem::Requirement
366
366
  requirements:
367
367
  - - '='
368
368
  - !ruby/object:Gem::Version
369
- version: 0.18.0.5
369
+ version: 0.19.0.0.rc2
370
370
  type: :development
371
371
  prerelease: false
372
372
  version_requirements: !ruby/object:Gem::Requirement
373
373
  requirements:
374
374
  - - '='
375
375
  - !ruby/object:Gem::Version
376
- version: 0.18.0.5
376
+ version: 0.19.0.0.rc2
377
377
  - !ruby/object:Gem::Dependency
378
378
  name: elasticgraph-opensearch
379
379
  requirement: !ruby/object:Gem::Requirement
380
380
  requirements:
381
381
  - - '='
382
382
  - !ruby/object:Gem::Version
383
- version: 0.18.0.5
383
+ version: 0.19.0.0.rc2
384
384
  type: :development
385
385
  prerelease: false
386
386
  version_requirements: !ruby/object:Gem::Requirement
387
387
  requirements:
388
388
  - - '='
389
389
  - !ruby/object:Gem::Version
390
- version: 0.18.0.5
390
+ version: 0.19.0.0.rc2
391
391
  description:
392
392
  email:
393
393
  - myron@squareup.com
@@ -469,10 +469,15 @@ files:
469
469
  - lib/elastic_graph/schema_definition/scripting/scripts/update/index_data.painless
470
470
  - lib/elastic_graph/schema_definition/state.rb
471
471
  - lib/elastic_graph/schema_definition/test_support.rb
472
- homepage:
472
+ homepage: https://block.github.io/elasticgraph/
473
473
  licenses:
474
474
  - MIT
475
475
  metadata:
476
+ bug_tracker_uri: https://github.com/block/elasticgraph/issues
477
+ changelog_uri: https://github.com/block/elasticgraph/releases/tag/v0.19.0.0.rc2
478
+ documentation_uri: https://block.github.io/elasticgraph/docs/main/
479
+ homepage_uri: https://block.github.io/elasticgraph/
480
+ source_code_uri: https://github.com/block/elasticgraph/tree/v0.19.0.0.rc2/elasticgraph-schema_definition
476
481
  gem_category: local
477
482
  post_install_message:
478
483
  rdoc_options: []