graphql-client 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/graphql/client.rb +8 -1
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e4479e6ded8ce37427e5860e1933f5a300c1b50
|
4
|
+
data.tar.gz: 003125bef74a999629acb8ed10311cb209b2836a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4eba62b6ade25e1767138e410be130a7caf818464507aecec649903f0a896e69f7442a0f908fbc09382743a4292342abefa5562b58b4973924e85429e46db696
|
7
|
+
data.tar.gz: 376afde0857506206c374cc9980d4577d99d83be32366939135da786c8152e4177dc75414727f77ab2ddc10300281316fa7f4522180681b9d91b681e22259646
|
data/lib/graphql/client.rb
CHANGED
@@ -24,6 +24,12 @@ module GraphQL
|
|
24
24
|
|
25
25
|
attr_accessor :document_tracking_enabled
|
26
26
|
|
27
|
+
# Deprecated: Allow dynamically generated queries to be passed to
|
28
|
+
# Client#query.
|
29
|
+
#
|
30
|
+
# This ability will eventually be removed in future versions.
|
31
|
+
attr_accessor :allow_dynamic_queries
|
32
|
+
|
27
33
|
def self.load_schema(schema)
|
28
34
|
case schema
|
29
35
|
when GraphQL::Schema
|
@@ -69,6 +75,7 @@ module GraphQL
|
|
69
75
|
@execute = execute
|
70
76
|
@document = GraphQL::Language::Nodes::Document.new(definitions: [])
|
71
77
|
@document_tracking_enabled = false
|
78
|
+
@allow_dynamic_queries = false
|
72
79
|
end
|
73
80
|
|
74
81
|
# Definitions are constructed by Client.parse and wrap a parsed AST of the
|
@@ -252,7 +259,7 @@ module GraphQL
|
|
252
259
|
raise TypeError, "expected definition to be a #{OperationDefinition.name} but was #{document.class.name}"
|
253
260
|
end
|
254
261
|
|
255
|
-
|
262
|
+
if allow_dynamic_queries == false && definition.name.nil?
|
256
263
|
raise DynamicQueryError, "expected definition to be assigned to a static constant https://git.io/vXXSE"
|
257
264
|
end
|
258
265
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graphql-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitHub
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -154,4 +154,3 @@ signing_key:
|
|
154
154
|
specification_version: 4
|
155
155
|
summary: GraphQL Client
|
156
156
|
test_files: []
|
157
|
-
has_rdoc:
|