elasticgraph-query_registry 1.0.0.rc3 → 1.0.0.rc4
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 +15 -36
- metadata +14 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bb6760dd59181027abbc286901e5a03c825378cde3867eef0fb02a3bbff9ce9
|
4
|
+
data.tar.gz: 8a8c7f3193a40f40bdfe9bdf8ffb32fb8db2dd2ed4cca6e4c2a79e5f22f56ebd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a971b45cea1fa5afe0da7242b2f9445c2a0348fa79601040a6839ec4d52ca936bdc394f0a1f29ddc9bb5ae7cd4a3c3cfa6d510cce8cac1f0963ea3614d32c89
|
7
|
+
data.tar.gz: 29187cf7027a40e3086e84846d86797a73b32d69245ae4e819f68ded25ce5fa941faf831a3d8949afba34acbeb3355831bf5684067a42e4211441b29889f24be
|
data/README.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# ElasticGraph::QueryRegistry
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
Provides a source-controlled query registry for ElasticGraph applications.
|
4
|
+
This is designed for cases where the clients of your application are other
|
5
|
+
internal teams in your organization, who are willing to register their
|
6
|
+
queries before using them.
|
7
7
|
|
8
8
|
Query registration provides a few key benefits:
|
9
9
|
|
@@ -104,19 +104,11 @@ execute any query.
|
|
104
104
|
|
105
105
|
## Setup
|
106
106
|
|
107
|
-
|
107
|
+
`elasticgraph-query_registry` comes installed in new projects bootstrapped using `elasticgraph new`.
|
108
108
|
|
109
|
-
|
110
|
-
gem "elasticgraph-query_registry"
|
111
|
-
```
|
112
|
-
|
113
|
-
Next, configure this library in your ElasticGraph config YAML files:
|
109
|
+
Configure it in your ElasticGraph config YAML files:
|
114
110
|
|
115
|
-
```
|
116
|
-
graphql:
|
117
|
-
extension_modules:
|
118
|
-
- require_path: elastic_graph/query_registry/graphql_extension
|
119
|
-
name: ElasticGraph::QueryRegistry::GraphQLExtension
|
111
|
+
```yaml
|
120
112
|
query_registry:
|
121
113
|
allow_unregistered_clients: false
|
122
114
|
allow_any_query_for_clients:
|
@@ -124,21 +116,6 @@ query_registry:
|
|
124
116
|
path_to_registry: config/queries
|
125
117
|
```
|
126
118
|
|
127
|
-
Next, load the `ElasticGraph::QueryRegistry` rake tasks in your `Rakefile`:
|
128
|
-
|
129
|
-
``` ruby
|
130
|
-
require "elastic_graph/query_registry/rake_tasks"
|
131
|
-
|
132
|
-
ElasticGraph::QueryRegistry::RakeTasks.from_yaml_file(
|
133
|
-
"path/to/settings.yaml",
|
134
|
-
"config/queries",
|
135
|
-
require_eg_latency_slo_directive: true
|
136
|
-
)
|
137
|
-
```
|
138
|
-
|
139
|
-
You'll want to add `rake query_registry:validate_queries` to your CI build so
|
140
|
-
that every registered query is validated as part of every build.
|
141
|
-
|
142
119
|
Finally, your application needs to include a `client:` when submitting
|
143
120
|
each GraphQL query for execution. The client `name` should match the
|
144
121
|
name of one of the registry client subdirectories. If you are using
|
@@ -159,10 +136,12 @@ This library also uses some generated artifacts (`*.variables.yaml` files)
|
|
159
136
|
so it can detect when a change to the structure or type of a variable is
|
160
137
|
backward-incompatible. For this to work, it requires that the generated
|
161
138
|
variables files are kept up-to-date. Any time a change impacts the structure
|
162
|
-
of any variables used by any queries, you'll need to run a task
|
163
|
-
|
164
|
-
|
139
|
+
of any variables used by any queries, you'll need to run a task to update the
|
140
|
+
artifacts:
|
141
|
+
|
142
|
+
```bash
|
143
|
+
bundle exec rake "query_registry:dump_variables[client_name, query_name]"
|
144
|
+
```
|
165
145
|
|
166
|
-
Don't worry about if you forget this, though--the
|
167
|
-
|
168
|
-
instructions anytime a variables file is not up-to-date.
|
146
|
+
Don't worry about if you forget this, though--the `query_registry:validate_queries`
|
147
|
+
task will also fail and give you instructions anytime a variables file is not up-to-date.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elasticgraph-query_registry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.rc4
|
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.rc4
|
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.rc4
|
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.rc4
|
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.rc4
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: graphql
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -93,28 +93,28 @@ dependencies:
|
|
93
93
|
requirements:
|
94
94
|
- - '='
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 1.0.0.
|
96
|
+
version: 1.0.0.rc4
|
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.rc4
|
104
104
|
- !ruby/object:Gem::Dependency
|
105
105
|
name: elasticgraph-opensearch
|
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.rc4
|
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.rc4
|
118
118
|
email:
|
119
119
|
- myron@squareup.com
|
120
120
|
executables: []
|
@@ -137,10 +137,10 @@ licenses:
|
|
137
137
|
- MIT
|
138
138
|
metadata:
|
139
139
|
bug_tracker_uri: https://github.com/block/elasticgraph/issues
|
140
|
-
changelog_uri: https://github.com/block/elasticgraph/releases/tag/v1.0.0.
|
141
|
-
documentation_uri: https://block.github.io/elasticgraph/api-docs/v1.0.0.
|
140
|
+
changelog_uri: https://github.com/block/elasticgraph/releases/tag/v1.0.0.rc4
|
141
|
+
documentation_uri: https://block.github.io/elasticgraph/api-docs/v1.0.0.rc4/
|
142
142
|
homepage_uri: https://block.github.io/elasticgraph/
|
143
|
-
source_code_uri: https://github.com/block/elasticgraph/tree/v1.0.0.
|
143
|
+
source_code_uri: https://github.com/block/elasticgraph/tree/v1.0.0.rc4/elasticgraph-query_registry
|
144
144
|
gem_category: extension
|
145
145
|
rdoc_options: []
|
146
146
|
require_paths:
|
@@ -159,9 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
159
159
|
- !ruby/object:Gem::Version
|
160
160
|
version: '0'
|
161
161
|
requirements: []
|
162
|
-
rubygems_version: 3.6.
|
162
|
+
rubygems_version: 3.6.9
|
163
163
|
specification_version: 4
|
164
|
-
summary:
|
165
|
-
GraphQL queries based on a registry and validating registered queries against the
|
166
|
-
schema.
|
164
|
+
summary: Provides a source-controlled query registry for ElasticGraph applications.
|
167
165
|
test_files: []
|