graphql-query-builder
Advanced tools
Comparing version
@@ -106,3 +106,3 @@ "use strict"; | ||
this.filter(_aliasS_OR_Filter); | ||
} else if (undefined === _aliasS_OR_Filter && 2 == arguments.length){ | ||
} else if (undefined === _aliasS_OR_Filter && 2 === arguments.length){ | ||
throw new TypeError("You have passed undefined as Second argument to 'Query'"); | ||
@@ -109,0 +109,0 @@ } else if (undefined !== _aliasS_OR_Filter){ |
{ | ||
"name": "graphql-query-builder", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "a simple but powerful graphQL query builder", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
# graphql-query-builder | ||
### If this was helpful, [★ it on github](https://github.com/codemeasandwich/graphql-query-builder) | ||
a simple but powerful graphQL query builder | ||
**info:** | ||
[](https://badge.fury.io/js/graphql-query-builder) | ||
[](http://doge.mit-license.org) | ||
[](https://github.com/codemeasandwich/graphql-query-builder/pulls) | ||
**tests:** | ||
[](https://travis-ci.org/codemeasandwich/graphql-query-builder) | ||
[](https://coveralls.io/github/codemeasandwich/graphql-query-builder?branch=master) | ||
**quality:** | ||
[](https://codeclimate.com/github/codemeasandwich/graphql-query-builder) | ||
[](https://www.bithound.io/github/codemeasandwich/graphql-query-builder) | ||
[](https://codeclimate.com/github/codemeasandwich/graphql-query-builder) | ||
a simple but powerful graphQL query builder | ||
### If this was helpful, [★ it on github](https://github.com/codemeasandwich/graphql-query-builder) | ||
@@ -13,0 +26,0 @@ *tested on [**NodeJS**](https://nodejs.org) and [**Webpack**](https://webpack.github.io)* |
17
test.js
@@ -11,7 +11,6 @@ "use strict"; | ||
it('should allow function chaining', function(){ | ||
it('should accept a single find value', function(){ | ||
let expeted = `user{age}`; | ||
let user = new Query("user").find("age"); | ||
let expeted = `user{name}`; | ||
let user = new Query("user").find("name"); | ||
expect(removeSpaces(expeted)).to.equal(removeSpaces(user)); | ||
@@ -44,9 +43,2 @@ }); | ||
it('should accept a single find value', function(){ | ||
let expeted = `user{name}`; | ||
let user = new Query("user").find("name"); | ||
expect(removeSpaces(expeted)).to.equal(removeSpaces(user)); | ||
}); | ||
it('should accept a single find value with alia', function(){ | ||
@@ -194,4 +186,3 @@ let expeted = `user{nickname:name}`; | ||
it('should throw Error if you accidentally pass an undefined', function(){ | ||
let alia = undefined; | ||
expect(() => new Query("x",alia)).to.throw(Error); | ||
expect(() => new Query("x",undefined)).to.throw(Error); | ||
}); | ||
@@ -198,0 +189,0 @@ |
400425
0.08%166
8.5%1021
-0.58%