graphql-client 0.0.12 → 0.0.13
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/lib/graphql/client.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d8762117d68370f7ab50f12de8f99bf64a87f290
|
|
4
|
+
data.tar.gz: 12a844978583a7169372811fd799e18b8a0f6801
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a709b758c34f5be18fec7da6e6bb4f2b2a666d7874d94be1bade9a75ba6c7f063dc876a0a1a83bc9a41ffc02174a75785cece84011dcc5ba428023577a8bb1ee
|
|
7
|
+
data.tar.gz: 84dfd8a54269da9a06ecba51430bccd98ad11fc36af751ee255294fc169eba1486c6d12869291f8fc1f63eae0c38dd21615f42e197343071ad2988f782f08969
|
data/lib/graphql/client.rb
CHANGED
|
@@ -199,13 +199,13 @@ module GraphQL
|
|
|
199
199
|
end
|
|
200
200
|
end
|
|
201
201
|
|
|
202
|
-
def query(definition, variables: {})
|
|
202
|
+
def query(definition, variables: {}, context: {})
|
|
203
203
|
unless fetch
|
|
204
204
|
raise Error, "client network fetching not configured"
|
|
205
205
|
end
|
|
206
206
|
|
|
207
207
|
document = definition.document
|
|
208
|
-
result = fetch.call(document, variables)
|
|
208
|
+
result = fetch.call(document, variables, context)
|
|
209
209
|
data, errors, extensions = result.values_at("data", "errors", "extensions")
|
|
210
210
|
|
|
211
211
|
if data && errors
|