We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fa2570e commit 31f6facCopy full SHA for 31f6fac
graphql.js
@@ -199,8 +199,7 @@
199
* {a: {b: {c: 1, d: 2}}}, "a.b.c" => 1
200
*/
201
GraphQLClient.prototype.fragmentPath = function (fragments, path) {
202
- var getter = new Function("fragments", "return fragments." + path.replace(/\./g, FRAGMENT_SEPERATOR))
203
- var obj = getter(fragments)
+ var obj = fragments[path.replace(/\./g, FRAGMENT_SEPERATOR)]
204
if (path != "on" && (!obj || typeof obj != "string")) {
205
throw new Error("Fragment " + path + " not found")
206
}
0 commit comments