github-graphql 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/github/graphql.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: a86f61ec91d399d881f818d82e6fc5094e173ba5
|
4
|
+
data.tar.gz: 2c3f1d083583b6e19fec80b7c9b43095a9643fab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47b96ec9b9a20f1e7e9f5fb6e1cfb9bfcd5b5ce4b716575714816222d239f73917be6325ea1bfe7c544c1136d21712d99577cd39947104f2e26a9755f08c8d69
|
7
|
+
data.tar.gz: 116944158300675b801287ed85af740653f95059ebacc000dfe98d996725cf952f850580bfde0fb68d7c28dd3bc73341f26a381efc403ebd6eed0929b317457f
|
data/lib/github/graphql.rb
CHANGED
@@ -6,7 +6,7 @@ module Github
|
|
6
6
|
|
7
7
|
# Used to Query the Github GraphQL API
|
8
8
|
class GraphQL
|
9
|
-
def initialize(token, query, vars)
|
9
|
+
def initialize(token, query, vars = nil)
|
10
10
|
@payload = {}
|
11
11
|
|
12
12
|
uri = URI.parse('https://api.github.com/graphql')
|
@@ -24,7 +24,7 @@ module Github
|
|
24
24
|
@request['Authorization'] = "bearer #{token}"
|
25
25
|
end
|
26
26
|
|
27
|
-
def payload(query, vars)
|
27
|
+
def payload(query, vars = nil)
|
28
28
|
@payload['query'] = query
|
29
29
|
@payload['variables'] = vars
|
30
30
|
@request.body = @payload.to_json
|