elasticgraph-schema_definition 0.19.0.0.rc1 → 0.19.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/elasticgraph-schema_definition.gemspec +1 -1
- data/lib/elastic_graph/schema_definition/mixins/has_derived_graphql_type_customizations.rb +8 -5
- data/lib/elastic_graph/schema_definition/mixins/has_subtypes.rb +3 -2
- data/lib/elastic_graph/schema_definition/mixins/implements_interfaces.rb +2 -1
- data/lib/elastic_graph/schema_definition/results.rb +3 -2
- data/lib/elastic_graph/schema_definition/schema_elements/enum_value_namer.rb +2 -1
- data/lib/elastic_graph/schema_definition/state.rb +4 -2
- metadata +31 -31
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd45e7eb43e6292b8760fb4eb36b76866ee5b6f9a3c93691648266317a7b32bf
|
4
|
+
data.tar.gz: 47696d843f0fa115ec60cbc268679ed9e11686f5c4d2a4f99bc034eb58e3d3c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84a5ee13c253e5ef66c8c83f421ce18cbf3577aed40e71c6554532650eb4d01f00750f3672a6e8b3cb8860767d0c7e25649f88749c1570d463bc6e119f695216
|
7
|
+
data.tar.gz: 2930ed88573f6b0764eaf145b60aa7a1b3404a94f79d579a17b598e96d82b2210905dc7bdc2e7d947723ecd63e4096ce6e78f84649dcf4fd12f2b8d365918744
|
@@ -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.4.
|
19
|
+
spec.add_dependency "graphql", "~> 2.4.8"
|
20
20
|
spec.add_dependency "rake", "~> 13.2"
|
21
21
|
|
22
22
|
spec.add_development_dependency "elasticgraph-admin", eg_version
|
@@ -50,7 +50,8 @@ module ElasticGraph
|
|
50
50
|
derived_type_customizations_for_all_types << customization_block
|
51
51
|
else
|
52
52
|
type_names.each do |t|
|
53
|
-
derived_type_customizations_by_name[t.to_s]
|
53
|
+
derived_type_customizations = derived_type_customizations_by_name[t.to_s] # : ::Array[^(::ElasticGraph::SchemaDefinition::_Type) -> void]
|
54
|
+
derived_type_customizations << customization_block
|
54
55
|
end
|
55
56
|
end
|
56
57
|
end
|
@@ -75,21 +76,23 @@ module ElasticGraph
|
|
75
76
|
# end
|
76
77
|
# end
|
77
78
|
def customize_derived_type_fields(type_name, *field_names, &customization_block)
|
78
|
-
customizations_by_field = derived_field_customizations_by_type_and_field_name[type_name]
|
79
|
+
customizations_by_field = derived_field_customizations_by_type_and_field_name[type_name] # : ::Hash[::String, ::Array[^(::ElasticGraph::SchemaDefinition::SchemaElements::Field) -> void]]
|
79
80
|
|
80
81
|
field_names.each do |field_name|
|
81
|
-
customizations_by_field[field_name]
|
82
|
+
customizations = customizations_by_field[field_name] # : ::Array[^(::ElasticGraph::SchemaDefinition::SchemaElements::Field) -> void]
|
83
|
+
customizations << customization_block
|
82
84
|
end
|
83
85
|
end
|
84
86
|
|
85
87
|
# @private
|
86
88
|
def derived_type_customizations_for_type(type)
|
87
|
-
derived_type_customizations_by_name[type.name]
|
89
|
+
derived_type_customizations = derived_type_customizations_by_name[type.name] # : ::Array[^(::ElasticGraph::SchemaDefinition::_Type) -> void]
|
90
|
+
derived_type_customizations + derived_type_customizations_for_all_types
|
88
91
|
end
|
89
92
|
|
90
93
|
# @private
|
91
94
|
def derived_field_customizations_by_name_for_type(type)
|
92
|
-
derived_field_customizations_by_type_and_field_name[type.name]
|
95
|
+
derived_field_customizations_by_type_and_field_name[type.name] # : ::Hash[::String, ::Array[^(SchemaElements::Field) -> void]]
|
93
96
|
end
|
94
97
|
|
95
98
|
# @private
|
@@ -75,8 +75,9 @@ module ElasticGraph
|
|
75
75
|
fields_by_name.merge(yield subtype) do |field_name, def1, def2|
|
76
76
|
if (def1.name_in_index == def2.name_in_index && def1.resolve_mapping != def2.resolve_mapping) || (def1.type.unwrap_non_null != def2.type.unwrap_non_null)
|
77
77
|
def_strings = resolved_subtypes.each_with_object([]) do |st, defs|
|
78
|
-
field = st.graphql_fields_by_name[field_name]
|
79
|
-
|
78
|
+
if (field = st.graphql_fields_by_name[field_name])
|
79
|
+
defs << "on #{st.name}:\n#{field.to_sdl.strip} mapping: #{field.resolve_mapping.inspect}"
|
80
|
+
end
|
80
81
|
end
|
81
82
|
|
82
83
|
raise Errors::SchemaError,
|
@@ -43,7 +43,8 @@ module ElasticGraph
|
|
43
43
|
def implements(*interface_names)
|
44
44
|
interface_refs = interface_names.map do |interface_name|
|
45
45
|
schema_def_state.type_ref(interface_name).to_final_form.tap do |interface_ref|
|
46
|
-
schema_def_state.implementations_by_interface_ref[interface_ref]
|
46
|
+
implementations = schema_def_state.implementations_by_interface_ref[interface_ref] # : ::Set[SchemaElements::TypeWithSubfields]
|
47
|
+
implementations << self
|
47
48
|
end
|
48
49
|
end
|
49
50
|
|
@@ -329,7 +329,7 @@ module ElasticGraph
|
|
329
329
|
|
330
330
|
def recursively_add_referenced_types_to(source_type_ref, references_cache)
|
331
331
|
return unless (source_type = source_type_ref.as_object_type)
|
332
|
-
references_set = references_cache[source_type_ref.name]
|
332
|
+
references_set = references_cache[source_type_ref.name] # : ::Set[::String]
|
333
333
|
|
334
334
|
# Recursive references are allowed only when its a relation, so skip that case.
|
335
335
|
source_type.graphql_fields_by_name.values.reject { |f| f.relationship }.each do |field|
|
@@ -339,7 +339,8 @@ module ElasticGraph
|
|
339
339
|
recursively_add_referenced_types_to(field_type, references_cache)
|
340
340
|
end
|
341
341
|
|
342
|
-
|
342
|
+
field_type_references_set = references_cache[field_type.name] # : ::Set[::String]
|
343
|
+
references_set.merge(field_type_references_set)
|
343
344
|
end
|
344
345
|
end
|
345
346
|
|
@@ -29,7 +29,8 @@ module ElasticGraph
|
|
29
29
|
|
30
30
|
# Returns the name that should be used for the given `type_name` and `value_name`.
|
31
31
|
def name_for(type_name, value_name)
|
32
|
-
@used_value_names_by_type_name[type_name]
|
32
|
+
used_value_names = @used_value_names_by_type_name[type_name] # : ::Array[::String]
|
33
|
+
used_value_names << value_name
|
33
34
|
overrides_by_type_name.dig(type_name, value_name) || value_name
|
34
35
|
end
|
35
36
|
|
@@ -139,7 +139,8 @@ module ElasticGraph
|
|
139
139
|
end
|
140
140
|
|
141
141
|
def register_renamed_field(type_name, from:, to:, defined_at:, defined_via:)
|
142
|
-
renamed_fields_by_type_name_and_old_field_name[type_name][
|
142
|
+
renamed_fields_by_old_field_name = renamed_fields_by_type_name_and_old_field_name[type_name] # : ::Hash[::String, SchemaElements::DeprecatedElement]
|
143
|
+
renamed_fields_by_old_field_name[from] = factory.new_deprecated_element(
|
143
144
|
to,
|
144
145
|
defined_at: defined_at,
|
145
146
|
defined_via: defined_via
|
@@ -147,7 +148,8 @@ module ElasticGraph
|
|
147
148
|
end
|
148
149
|
|
149
150
|
def register_deleted_field(type_name, field_name, defined_at:, defined_via:)
|
150
|
-
deleted_fields_by_type_name_and_old_field_name[type_name][
|
151
|
+
deleted_fields_by_old_field_name = deleted_fields_by_type_name_and_old_field_name[type_name] # : ::Hash[::String, SchemaElements::DeprecatedElement]
|
152
|
+
deleted_fields_by_old_field_name[field_name] = factory.new_deprecated_element(
|
151
153
|
field_name,
|
152
154
|
defined_at: defined_at,
|
153
155
|
defined_via: defined_via
|
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.19.0.0
|
4
|
+
version: 0.19.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Myron Marston
|
8
8
|
- Ben VandenBos
|
9
9
|
- Block Engineering
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2024-12-
|
13
|
+
date: 2024-12-10 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rubocop-factory_bot
|
@@ -74,14 +74,14 @@ dependencies:
|
|
74
74
|
requirements:
|
75
75
|
- - "~>"
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version:
|
77
|
+
version: 1.9.0
|
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:
|
84
|
+
version: 1.9.0
|
85
85
|
- !ruby/object:Gem::Dependency
|
86
86
|
name: coderay
|
87
87
|
requirement: !ruby/object:Gem::Requirement
|
@@ -240,84 +240,84 @@ dependencies:
|
|
240
240
|
requirements:
|
241
241
|
- - '='
|
242
242
|
- !ruby/object:Gem::Version
|
243
|
-
version: 0.19.0.0
|
243
|
+
version: 0.19.0.0
|
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.19.0.0
|
250
|
+
version: 0.19.0.0
|
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.19.0.0
|
257
|
+
version: 0.19.0.0
|
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.19.0.0
|
264
|
+
version: 0.19.0.0
|
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.19.0.0
|
271
|
+
version: 0.19.0.0
|
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.19.0.0
|
278
|
+
version: 0.19.0.0
|
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.19.0.0
|
285
|
+
version: 0.19.0.0
|
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.19.0.0
|
292
|
+
version: 0.19.0.0
|
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.19.0.0
|
299
|
+
version: 0.19.0.0
|
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.19.0.0
|
306
|
+
version: 0.19.0.0
|
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.4.
|
313
|
+
version: 2.4.8
|
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.4.
|
320
|
+
version: 2.4.8
|
321
321
|
- !ruby/object:Gem::Dependency
|
322
322
|
name: rake
|
323
323
|
requirement: !ruby/object:Gem::Requirement
|
@@ -338,57 +338,57 @@ dependencies:
|
|
338
338
|
requirements:
|
339
339
|
- - '='
|
340
340
|
- !ruby/object:Gem::Version
|
341
|
-
version: 0.19.0.0
|
341
|
+
version: 0.19.0.0
|
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.19.0.0
|
348
|
+
version: 0.19.0.0
|
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.19.0.0
|
355
|
+
version: 0.19.0.0
|
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.19.0.0
|
362
|
+
version: 0.19.0.0
|
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.19.0.0
|
369
|
+
version: 0.19.0.0
|
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.19.0.0
|
376
|
+
version: 0.19.0.0
|
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.19.0.0
|
383
|
+
version: 0.19.0.0
|
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.19.0.0
|
391
|
-
description:
|
390
|
+
version: 0.19.0.0
|
391
|
+
description:
|
392
392
|
email:
|
393
393
|
- myron@squareup.com
|
394
394
|
executables: []
|
@@ -474,12 +474,12 @@ licenses:
|
|
474
474
|
- MIT
|
475
475
|
metadata:
|
476
476
|
bug_tracker_uri: https://github.com/block/elasticgraph/issues
|
477
|
-
changelog_uri: https://github.com/block/elasticgraph/releases/tag/v0.19.0.0
|
477
|
+
changelog_uri: https://github.com/block/elasticgraph/releases/tag/v0.19.0.0
|
478
478
|
documentation_uri: https://block.github.io/elasticgraph/docs/main/
|
479
479
|
homepage_uri: https://block.github.io/elasticgraph/
|
480
|
-
source_code_uri: https://github.com/block/elasticgraph/tree/v0.19.0.0
|
480
|
+
source_code_uri: https://github.com/block/elasticgraph/tree/v0.19.0.0/elasticgraph-schema_definition
|
481
481
|
gem_category: local
|
482
|
-
post_install_message:
|
482
|
+
post_install_message:
|
483
483
|
rdoc_options: []
|
484
484
|
require_paths:
|
485
485
|
- lib
|
@@ -494,8 +494,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
494
494
|
- !ruby/object:Gem::Version
|
495
495
|
version: '0'
|
496
496
|
requirements: []
|
497
|
-
rubygems_version: 3.5.
|
498
|
-
signing_key:
|
497
|
+
rubygems_version: 3.5.22
|
498
|
+
signing_key:
|
499
499
|
specification_version: 4
|
500
500
|
summary: ElasticGraph gem that provides the schema definition API and generates schema
|
501
501
|
artifacts.
|