elasticgraph-apollo 1.0.0.rc3 → 1.0.0
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/README.md +56 -38
- data/script/test_compatibility +2 -2
- metadata +20 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21842ee3767624f6fa539ad41ae31b6fe39a7bc7eec30c21dcbe9c2b8a92cd24
|
4
|
+
data.tar.gz: eafbc25b3e603edf187b2160a9e564c6a2f578906268a614892a261b293ea261
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd708d85b1c23ca1abd3b6c844a175fee782260040b1a71bae9f9b460e25bbe73e8c7ec97831195b5b1eacbe105d4a7d5f6eb11496e7074af999ce8257351afd
|
7
|
+
data.tar.gz: 579505689ff980f0eda01a52fb09908819add72ea805333f837a0234e18cdc083ce693ed1db497713c843a5e9c2d759554128553d02b589d8a0a8a65ca59ca17
|
data/README.md
CHANGED
@@ -32,57 +32,75 @@ graph LR;
|
|
32
32
|
|
33
33
|
## Usage
|
34
34
|
|
35
|
-
First, add `elasticgraph-apollo` to your `Gemfile
|
35
|
+
First, add `elasticgraph-apollo` to your `Gemfile`, alongside the other ElasticGraph gems:
|
36
|
+
|
37
|
+
```diff
|
38
|
+
diff --git a/Gemfile b/Gemfile
|
39
|
+
index 4a5ef1e..5c16c2b 100644
|
40
|
+
--- a/Gemfile
|
41
|
+
+++ b/Gemfile
|
42
|
+
@@ -8,6 +8,7 @@ gem "elasticgraph-query_registry", *elasticgraph_details
|
43
|
+
|
44
|
+
# Can be elasticgraph-elasticsearch or elasticgraph-opensearch based on the datastore you want to use.
|
45
|
+
gem "elasticgraph-opensearch", *elasticgraph_details
|
46
|
+
+gem "elasticgraph-apollo", *elasticgraph_details
|
47
|
+
|
48
|
+
gem "httpx", "~> 1.3"
|
36
49
|
|
37
|
-
``` ruby
|
38
|
-
gem "elasticgraph-apollo"
|
39
50
|
```
|
40
51
|
|
41
|
-
Finally, update
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
52
|
+
Finally, update `Rakefile` so that `ElasticGraph::GraphQL::Apollo::SchemaDefinition::APIExtension` is
|
53
|
+
used as one of the `extension_modules`:
|
54
|
+
|
55
|
+
```diff
|
56
|
+
diff --git a/Rakefile b/Rakefile
|
57
|
+
index 2943335..26633c3 100644
|
58
|
+
--- a/Rakefile
|
59
|
+
+++ b/Rakefile
|
60
|
+
@@ -1,5 +1,6 @@
|
61
|
+
project_root = File.expand_path(__dir__)
|
62
|
+
|
63
|
+
+require "elastic_graph/apollo/schema_definition/api_extension"
|
64
|
+
require "elastic_graph/local/rake_tasks"
|
65
|
+
require "elastic_graph/query_registry/rake_tasks"
|
66
|
+
require "rspec/core/rake_task"
|
67
|
+
@@ -12,6 +13,8 @@ ElasticGraph::Local::RakeTasks.new(
|
68
|
+
local_config_yaml: settings_file,
|
69
|
+
path_to_schema: "#{project_root}/config/schema.rb"
|
70
|
+
) do |tasks|
|
71
|
+
+ tasks.schema_definition_extension_modules = [ElasticGraph::Apollo::SchemaDefinition::APIExtension]
|
72
|
+
+
|
73
|
+
# Set this to true once you're beyond the prototyping stage.
|
74
|
+
tasks.enforce_json_schema_version = false
|
75
|
+
|
56
76
|
```
|
57
77
|
|
58
78
|
That's it!
|
59
79
|
|
60
80
|
## Federation Version Support
|
61
81
|
|
62
|
-
This library supports multiple versions of Apollo federation.
|
82
|
+
This library supports multiple versions of Apollo federation. The latest release supports:
|
63
83
|
|
64
84
|
* v2.0
|
65
85
|
* v2.3
|
66
86
|
* v2.5
|
67
87
|
* v2.6
|
68
88
|
|
69
|
-
By default, the newest version is targeted. If you need an older version (e.g. because your organization is
|
70
|
-
|
71
|
-
|
72
|
-
```
|
73
|
-
schema.
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
```
|
87
|
-
ERROR: for apollo-federation-subgraph-compatibility_router_1 Cannot start service router: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:76: mounting "/host_mnt/Users/myron/Development/sq-elasticgraph-ruby/elasticgraph-apollo/vendor/apollo-federation-subgraph-compatibility/supergraph.graphql" to rootfs at "/etc/config/supergraph.graphql" caused: mount through procfd: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
|
89
|
+
By default, the newest version is targeted. If you need an older version (e.g. because your organization is running
|
90
|
+
an older Apollo version), you can configure it in your schema definition with `schema.target_apollo_federation_version`:
|
91
|
+
|
92
|
+
```diff
|
93
|
+
diff --git a/config/schema.rb b/config/schema.rb
|
94
|
+
index 015c5fa..362cdcb 100644
|
95
|
+
--- a/config/schema.rb
|
96
|
+
+++ b/config/schema.rb
|
97
|
+
@@ -4,6 +4,8 @@ ElasticGraph.define_schema do |schema|
|
98
|
+
# ElasticGraph will tell you when you need to bump this.
|
99
|
+
schema.json_schema_version 1
|
100
|
+
|
101
|
+
+ schema.target_apollo_federation_version "2.3"
|
102
|
+
+
|
103
|
+
# This registers the elasticgraph-query_registry extension, which can be used to reject queries that
|
104
|
+
# clients have not registered (and to reject queries that differ from what a client has registered).
|
105
|
+
# In addition, every registered query is validated against the schema in the CI build, giving you
|
88
106
|
```
|
data/script/test_compatibility
CHANGED
@@ -22,9 +22,9 @@ script_dir=$(dirname $0)
|
|
22
22
|
# Default to the Apollo federation version 2.6, as higher versions are not supported by the test suite properly.
|
23
23
|
apollo_federation_version=${1:-2.6}
|
24
24
|
|
25
|
-
# Latest version as of
|
25
|
+
# Latest version as of 2025-08-01. Gotten from:
|
26
26
|
# https://www.npmjs.com/package/@apollo/federation-subgraph-compatibility?activeTab=versions
|
27
|
-
apollo_subgraph_tests_version=2.2.
|
27
|
+
apollo_subgraph_tests_version=2.2.1
|
28
28
|
|
29
29
|
TARGET_APOLLO_FEDERATION_VERSION=$apollo_federation_version bundle exec rake \
|
30
30
|
--rakefile $script_dir/../apollo_tests_implementation/Rakefile schema_artifacts:dump
|
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.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Myron Marston
|
@@ -17,28 +17,28 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - '='
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 1.0.0
|
20
|
+
version: 1.0.0
|
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.0
|
27
|
+
version: 1.0.0
|
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.0
|
34
|
+
version: 1.0.0
|
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.0
|
41
|
+
version: 1.0.0
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: graphql
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -79,70 +79,70 @@ dependencies:
|
|
79
79
|
requirements:
|
80
80
|
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 1.0.0
|
82
|
+
version: 1.0.0
|
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.0
|
89
|
+
version: 1.0.0
|
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.0
|
96
|
+
version: 1.0.0
|
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.0
|
103
|
+
version: 1.0.0
|
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.0
|
110
|
+
version: 1.0.0
|
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.0
|
117
|
+
version: 1.0.0
|
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.0
|
124
|
+
version: 1.0.0
|
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.0
|
131
|
+
version: 1.0.0
|
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.0
|
138
|
+
version: 1.0.0
|
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.0
|
145
|
+
version: 1.0.0
|
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.0
|
192
|
-
documentation_uri: https://block.github.io/elasticgraph/api-docs/v1.0.0
|
191
|
+
changelog_uri: https://github.com/block/elasticgraph/releases/tag/v1.0.0
|
192
|
+
documentation_uri: https://block.github.io/elasticgraph/api-docs/v1.0.0/
|
193
193
|
homepage_uri: https://block.github.io/elasticgraph/
|
194
|
-
source_code_uri: https://github.com/block/elasticgraph/tree/v1.0.0
|
194
|
+
source_code_uri: https://github.com/block/elasticgraph/tree/v1.0.0/elasticgraph-apollo
|
195
195
|
gem_category: extension
|
196
196
|
rdoc_options: []
|
197
197
|
require_paths:
|
@@ -210,7 +210,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
210
210
|
- !ruby/object:Gem::Version
|
211
211
|
version: '0'
|
212
212
|
requirements: []
|
213
|
-
rubygems_version: 3.6.
|
213
|
+
rubygems_version: 3.6.9
|
214
214
|
specification_version: 4
|
215
|
-
summary:
|
215
|
+
summary: Transforms an ElasticGraph project into an Apollo subgraph.
|
216
216
|
test_files: []
|