elasticgraph-apollo 1.0.2 → 1.0.3.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE.txt +1 -1
- data/apollo_tests_implementation/Gemfile +1 -1
- data/apollo_tests_implementation/Rakefile +1 -1
- data/apollo_tests_implementation/config/products_schema.rb +1 -1
- data/apollo_tests_implementation/config.ru +1 -1
- data/apollo_tests_implementation/lib/product_resolver.rb +1 -1
- data/lib/elastic_graph/apollo/graphql/apollo_entity_ref_resolver.rb +1 -1
- data/lib/elastic_graph/apollo/graphql/engine_extension.rb +1 -1
- data/lib/elastic_graph/apollo/graphql/entities_field_resolver.rb +9 -1
- data/lib/elastic_graph/apollo/graphql/http_endpoint_extension.rb +1 -1
- data/lib/elastic_graph/apollo/graphql/service_field_resolver.rb +1 -1
- data/lib/elastic_graph/apollo/schema_definition/api_extension.rb +1 -1
- data/lib/elastic_graph/apollo/schema_definition/apollo_directives.rb +5 -5
- data/lib/elastic_graph/apollo/schema_definition/argument_extension.rb +1 -1
- data/lib/elastic_graph/apollo/schema_definition/entity_type_extension.rb +1 -1
- data/lib/elastic_graph/apollo/schema_definition/enum_type_extension.rb +1 -1
- data/lib/elastic_graph/apollo/schema_definition/enum_value_extension.rb +1 -1
- data/lib/elastic_graph/apollo/schema_definition/factory_extension.rb +1 -1
- data/lib/elastic_graph/apollo/schema_definition/field_extension.rb +1 -1
- data/lib/elastic_graph/apollo/schema_definition/input_type_extension.rb +1 -1
- data/lib/elastic_graph/apollo/schema_definition/interface_type_extension.rb +1 -1
- data/lib/elastic_graph/apollo/schema_definition/object_and_interface_extension.rb +1 -1
- data/lib/elastic_graph/apollo/schema_definition/object_type_extension.rb +1 -1
- data/lib/elastic_graph/apollo/schema_definition/scalar_type_extension.rb +1 -1
- data/lib/elastic_graph/apollo/schema_definition/state_extension.rb +1 -1
- data/lib/elastic_graph/apollo/schema_definition/union_type_extension.rb +1 -1
- metadata +26 -26
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5c67224da666c8ec4a42660aca468e85d5ecf475cb0bab1fc1589f381d0482fb
|
|
4
|
+
data.tar.gz: 779198f684fe454c3ee6bfcd0b0a2dbe3cb4ef99f48cb47519f87c54e584d4aa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2e93ff0c2379ef61931b1e8959893be8a55475c36e57d26197e8e8d5cba017ad7b6087f13f7e1591ae58fe9587a2d0084300bf0ae754a6813bc254c0fcb60aee
|
|
7
|
+
data.tar.gz: c6f247530c8afeb1a872a77723875707d079f37ed2226f3ad851fc65bc178e2b23b58b20e594ad6fc738244998bdfa212c5e1d5d7f0f148bc493d3cb1bfcd0d1
|
data/LICENSE.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2024 -
|
|
1
|
+
# Copyright 2024 - 2026 Block, Inc.
|
|
2
2
|
#
|
|
3
3
|
# Use of this source code is governed by an MIT-style
|
|
4
4
|
# license that can be found in the LICENSE file or at
|
|
@@ -155,9 +155,17 @@ module ElasticGraph
|
|
|
155
155
|
)
|
|
156
156
|
end
|
|
157
157
|
|
|
158
|
+
# @private
|
|
158
159
|
Adapter = ::Data.define(:type, :schema_element_names) do
|
|
159
160
|
# @implements Adapter
|
|
160
161
|
|
|
162
|
+
# Customizes the given query to filter to entities matching the provided representations.
|
|
163
|
+
# Builds a filter matching all IDs from the representations and configures pagination
|
|
164
|
+
# and requested fields.
|
|
165
|
+
#
|
|
166
|
+
# @param query [ElasticGraph::GraphQL::DatastoreQuery] the query to customize
|
|
167
|
+
# @param representations [Array<RepresentationWithId>] the representations to query for
|
|
168
|
+
# @return [ElasticGraph::GraphQL::DatastoreQuery] the customized query
|
|
161
169
|
def customize_query(query, representations)
|
|
162
170
|
# Given a set of representations, builds a filter that will match all of them (and only them).
|
|
163
171
|
all_ids = representations.map(&:id).reject { |id| id.is_a?(::Array) or id.is_a?(::Hash) }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2024 -
|
|
1
|
+
# Copyright 2024 - 2026 Block, Inc.
|
|
2
2
|
#
|
|
3
3
|
# Use of this source code is governed by an MIT-style
|
|
4
4
|
# license that can be found in the LICENSE file or at
|
|
@@ -157,13 +157,13 @@ module ElasticGraph
|
|
|
157
157
|
# Adds the [`@policy` directive](https://www.apollographql.com/docs/federation/federated-types/federated-directives/#policy)
|
|
158
158
|
# to the schema element.
|
|
159
159
|
#
|
|
160
|
-
# @param policies [Array<String
|
|
160
|
+
# @param policies [Array<Array<String>>] List of authorization policies to evaluate.
|
|
161
161
|
# @return [void]
|
|
162
162
|
#
|
|
163
163
|
# @example Add `@policy` to a type
|
|
164
164
|
# ElasticGraph.define_schema do |schema|
|
|
165
165
|
# schema.object_type "Campaign" do |t|
|
|
166
|
-
# t.apollo_policy policies: ["Policy1", "Policy2"]
|
|
166
|
+
# t.apollo_policy policies: [["Policy1", "Policy2"]]
|
|
167
167
|
# end
|
|
168
168
|
# end
|
|
169
169
|
def apollo_policy(policies:)
|
|
@@ -227,14 +227,14 @@ module ElasticGraph
|
|
|
227
227
|
# Adds the [`@requiresScopes` directive](https://www.apollographql.com/docs/federation/federated-types/federated-directives/#requiresscopes)
|
|
228
228
|
# to the schema element.
|
|
229
229
|
#
|
|
230
|
-
# @param scopes [Array<String
|
|
230
|
+
# @param scopes [Array<Array<String>>] List of JWT scopes that must be granted to the user in order to access the underlying element data.
|
|
231
231
|
# @return [void]
|
|
232
232
|
#
|
|
233
233
|
# @example Add `@requiresScopes` to a field
|
|
234
234
|
# ElasticGraph.define_schema do |schema|
|
|
235
235
|
# schema.object_type "Product" do |t|
|
|
236
236
|
# t.field "shippingEstimate", "String" do |f|
|
|
237
|
-
# f.apollo_requires_scopes scopes: "shipping"
|
|
237
|
+
# f.apollo_requires_scopes scopes: [["shipping"]]
|
|
238
238
|
# end
|
|
239
239
|
# end
|
|
240
240
|
# end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: elasticgraph-apollo
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.3.rc1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Myron Marston
|
|
@@ -17,42 +17,42 @@ dependencies:
|
|
|
17
17
|
requirements:
|
|
18
18
|
- - '='
|
|
19
19
|
- !ruby/object:Gem::Version
|
|
20
|
-
version: 1.0.
|
|
20
|
+
version: 1.0.3.rc1
|
|
21
21
|
type: :runtime
|
|
22
22
|
prerelease: false
|
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
|
24
24
|
requirements:
|
|
25
25
|
- - '='
|
|
26
26
|
- !ruby/object:Gem::Version
|
|
27
|
-
version: 1.0.
|
|
27
|
+
version: 1.0.3.rc1
|
|
28
28
|
- !ruby/object:Gem::Dependency
|
|
29
29
|
name: elasticgraph-support
|
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
|
31
31
|
requirements:
|
|
32
32
|
- - '='
|
|
33
33
|
- !ruby/object:Gem::Version
|
|
34
|
-
version: 1.0.
|
|
34
|
+
version: 1.0.3.rc1
|
|
35
35
|
type: :runtime
|
|
36
36
|
prerelease: false
|
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
|
38
38
|
requirements:
|
|
39
39
|
- - '='
|
|
40
40
|
- !ruby/object:Gem::Version
|
|
41
|
-
version: 1.0.
|
|
41
|
+
version: 1.0.3.rc1
|
|
42
42
|
- !ruby/object:Gem::Dependency
|
|
43
43
|
name: graphql
|
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
|
45
45
|
requirements:
|
|
46
|
-
- -
|
|
46
|
+
- - "~>"
|
|
47
47
|
- !ruby/object:Gem::Version
|
|
48
|
-
version: 2.5.
|
|
48
|
+
version: 2.5.18
|
|
49
49
|
type: :runtime
|
|
50
50
|
prerelease: false
|
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
|
52
52
|
requirements:
|
|
53
|
-
- -
|
|
53
|
+
- - "~>"
|
|
54
54
|
- !ruby/object:Gem::Version
|
|
55
|
-
version: 2.5.
|
|
55
|
+
version: 2.5.18
|
|
56
56
|
- !ruby/object:Gem::Dependency
|
|
57
57
|
name: apollo-federation
|
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -62,7 +62,7 @@ dependencies:
|
|
|
62
62
|
version: '3.10'
|
|
63
63
|
- - ">="
|
|
64
64
|
- !ruby/object:Gem::Version
|
|
65
|
-
version: 3.10.
|
|
65
|
+
version: 3.10.3
|
|
66
66
|
type: :runtime
|
|
67
67
|
prerelease: false
|
|
68
68
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -72,77 +72,77 @@ dependencies:
|
|
|
72
72
|
version: '3.10'
|
|
73
73
|
- - ">="
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
|
-
version: 3.10.
|
|
75
|
+
version: 3.10.3
|
|
76
76
|
- !ruby/object:Gem::Dependency
|
|
77
77
|
name: elasticgraph-schema_definition
|
|
78
78
|
requirement: !ruby/object:Gem::Requirement
|
|
79
79
|
requirements:
|
|
80
80
|
- - '='
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
|
-
version: 1.0.
|
|
82
|
+
version: 1.0.3.rc1
|
|
83
83
|
type: :development
|
|
84
84
|
prerelease: false
|
|
85
85
|
version_requirements: !ruby/object:Gem::Requirement
|
|
86
86
|
requirements:
|
|
87
87
|
- - '='
|
|
88
88
|
- !ruby/object:Gem::Version
|
|
89
|
-
version: 1.0.
|
|
89
|
+
version: 1.0.3.rc1
|
|
90
90
|
- !ruby/object:Gem::Dependency
|
|
91
91
|
name: elasticgraph-admin
|
|
92
92
|
requirement: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
|
94
94
|
- - '='
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
|
-
version: 1.0.
|
|
96
|
+
version: 1.0.3.rc1
|
|
97
97
|
type: :development
|
|
98
98
|
prerelease: false
|
|
99
99
|
version_requirements: !ruby/object:Gem::Requirement
|
|
100
100
|
requirements:
|
|
101
101
|
- - '='
|
|
102
102
|
- !ruby/object:Gem::Version
|
|
103
|
-
version: 1.0.
|
|
103
|
+
version: 1.0.3.rc1
|
|
104
104
|
- !ruby/object:Gem::Dependency
|
|
105
105
|
name: elasticgraph-elasticsearch
|
|
106
106
|
requirement: !ruby/object:Gem::Requirement
|
|
107
107
|
requirements:
|
|
108
108
|
- - '='
|
|
109
109
|
- !ruby/object:Gem::Version
|
|
110
|
-
version: 1.0.
|
|
110
|
+
version: 1.0.3.rc1
|
|
111
111
|
type: :development
|
|
112
112
|
prerelease: false
|
|
113
113
|
version_requirements: !ruby/object:Gem::Requirement
|
|
114
114
|
requirements:
|
|
115
115
|
- - '='
|
|
116
116
|
- !ruby/object:Gem::Version
|
|
117
|
-
version: 1.0.
|
|
117
|
+
version: 1.0.3.rc1
|
|
118
118
|
- !ruby/object:Gem::Dependency
|
|
119
119
|
name: elasticgraph-opensearch
|
|
120
120
|
requirement: !ruby/object:Gem::Requirement
|
|
121
121
|
requirements:
|
|
122
122
|
- - '='
|
|
123
123
|
- !ruby/object:Gem::Version
|
|
124
|
-
version: 1.0.
|
|
124
|
+
version: 1.0.3.rc1
|
|
125
125
|
type: :development
|
|
126
126
|
prerelease: false
|
|
127
127
|
version_requirements: !ruby/object:Gem::Requirement
|
|
128
128
|
requirements:
|
|
129
129
|
- - '='
|
|
130
130
|
- !ruby/object:Gem::Version
|
|
131
|
-
version: 1.0.
|
|
131
|
+
version: 1.0.3.rc1
|
|
132
132
|
- !ruby/object:Gem::Dependency
|
|
133
133
|
name: elasticgraph-indexer
|
|
134
134
|
requirement: !ruby/object:Gem::Requirement
|
|
135
135
|
requirements:
|
|
136
136
|
- - '='
|
|
137
137
|
- !ruby/object:Gem::Version
|
|
138
|
-
version: 1.0.
|
|
138
|
+
version: 1.0.3.rc1
|
|
139
139
|
type: :development
|
|
140
140
|
prerelease: false
|
|
141
141
|
version_requirements: !ruby/object:Gem::Requirement
|
|
142
142
|
requirements:
|
|
143
143
|
- - '='
|
|
144
144
|
- !ruby/object:Gem::Version
|
|
145
|
-
version: 1.0.
|
|
145
|
+
version: 1.0.3.rc1
|
|
146
146
|
email:
|
|
147
147
|
- myron@squareup.com
|
|
148
148
|
executables: []
|
|
@@ -188,10 +188,10 @@ licenses:
|
|
|
188
188
|
- MIT
|
|
189
189
|
metadata:
|
|
190
190
|
bug_tracker_uri: https://github.com/block/elasticgraph/issues
|
|
191
|
-
changelog_uri: https://github.com/block/elasticgraph/releases/tag/v1.0.
|
|
192
|
-
documentation_uri: https://block.github.io/elasticgraph/api-docs/v1.0.
|
|
191
|
+
changelog_uri: https://github.com/block/elasticgraph/releases/tag/v1.0.3.rc1
|
|
192
|
+
documentation_uri: https://block.github.io/elasticgraph/api-docs/v1.0.3.rc1/
|
|
193
193
|
homepage_uri: https://block.github.io/elasticgraph/
|
|
194
|
-
source_code_uri: https://github.com/block/elasticgraph/tree/v1.0.
|
|
194
|
+
source_code_uri: https://github.com/block/elasticgraph/tree/v1.0.3.rc1/elasticgraph-apollo
|
|
195
195
|
gem_category: extension
|
|
196
196
|
rdoc_options: []
|
|
197
197
|
require_paths:
|
|
@@ -203,14 +203,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
203
203
|
version: '3.4'
|
|
204
204
|
- - "<"
|
|
205
205
|
- !ruby/object:Gem::Version
|
|
206
|
-
version: '
|
|
206
|
+
version: '4.1'
|
|
207
207
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
208
208
|
requirements:
|
|
209
209
|
- - ">="
|
|
210
210
|
- !ruby/object:Gem::Version
|
|
211
211
|
version: '0'
|
|
212
212
|
requirements: []
|
|
213
|
-
rubygems_version:
|
|
213
|
+
rubygems_version: 4.0.3
|
|
214
214
|
specification_version: 4
|
|
215
215
|
summary: Transforms an ElasticGraph project into an Apollo subgraph.
|
|
216
216
|
test_files: []
|