graphqljs-rails 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/graphql.js +4 -12
- data/lib/graphqljs/rails/version.rb +1 -1
- 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: ba7a6ab58b5d8372d73586d90108c809ec4bcf0a
|
4
|
+
data.tar.gz: c3988512f7d48b17a1d3b009312508ea3a32e44c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4be168b5e4f2b742d262b40b8d5d24078538bc28b9829ad403aef24078e4335acbb8959ac1992de11caeb874e75acc278b1c6999afb92d1d00df5495cd5acc24
|
7
|
+
data.tar.gz: f814a6500719fee6fb77f5ef6e2f0dda3ff671b302ca48acc8b2d12d10d7c30d90684a9f037549e4d6dd4951eacdc5afdec034d325bba991dd03d9780d2f5b63
|
@@ -25,18 +25,10 @@
|
|
25
25
|
return extended
|
26
26
|
}
|
27
27
|
|
28
|
-
function __xhr() {
|
29
|
-
if (window.XMLHttpRequest) {
|
30
|
-
return new window.XMLHttpRequest
|
31
|
-
} else {
|
32
|
-
try { return new ActiveXObject("MSXML2.XMLHTTP.3.0") } catch(ex) { return null }
|
33
|
-
}
|
34
|
-
}
|
35
|
-
|
36
28
|
function __request(method, url, headers, data, callback) {
|
37
29
|
var body = "query=" + escape(data.query) + "&variables=" + escape(JSON.stringify(data.variables))
|
38
30
|
if (typeof XMLHttpRequest != 'undefined') {
|
39
|
-
var xhr =
|
31
|
+
var xhr = new XMLHttpRequest
|
40
32
|
xhr.open(method, url, true)
|
41
33
|
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded')
|
42
34
|
xhr.setRequestHeader('Accept', 'application/json')
|
@@ -86,7 +78,7 @@
|
|
86
78
|
}
|
87
79
|
return _lazy
|
88
80
|
} else if (arguments[2] !== true) {
|
89
|
-
throw "You cannot create GraphQLClient instance. Please call GraphQLClient as function."
|
81
|
+
throw new Error("You cannot create GraphQLClient instance. Please call GraphQLClient as function.")
|
90
82
|
}
|
91
83
|
if (!options)
|
92
84
|
options = {}
|
@@ -132,7 +124,7 @@
|
|
132
124
|
var getter = new Function("fragments", "return fragments." + path.replace(/\./g, FRAGMENT_SEPERATOR))
|
133
125
|
var obj = getter(fragments)
|
134
126
|
if (path != "on" && (!obj || typeof obj != "string")) {
|
135
|
-
throw "Fragment " + path + " not found"
|
127
|
+
throw new Error("Fragment " + path + " not found")
|
136
128
|
}
|
137
129
|
return obj
|
138
130
|
}
|
@@ -147,7 +139,7 @@
|
|
147
139
|
if (fragment) {
|
148
140
|
var pathRegexp = new RegExp(fragmentRegexp.source.replace(/\((.*)\)/, path))
|
149
141
|
if (fragment.match(pathRegexp)) {
|
150
|
-
throw "Recursive fragment usage detected on " + path + "."
|
142
|
+
throw new Error("Recursive fragment usage detected on " + path + ".")
|
151
143
|
}
|
152
144
|
collectedFragments.push(fragment)
|
153
145
|
// Collect sub fragments
|