tyranid-graphql
Advanced tools
Comparing version 0.0.7 to 0.0.8
{ | ||
"name": "tyranid-graphql", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "GraphQL plugin for tyranid", | ||
"main": "dist-node4/src/index.js", | ||
"main": "dist/src/index.js", | ||
"scripts": { | ||
"start": "npm run build && node ./dist-node4/test/example/server.js", | ||
"babel": "./node_modules/.bin/babel ./dist-es2015 --out-dir ./dist-node4", | ||
"build": "rm -rf ./dist-es2015/ ./dist-node4/ && npm run lint && npm run tsc && npm run babel", | ||
"start": "npm run build && node ./dist/test/example/server.js", | ||
"build": "rm -rf ./dist/ && npm run lint && npm run tsc", | ||
"prettier": "prettier --write --single-quote './{src,test}/**/*.ts'", | ||
"pretest": "npm run build", | ||
"prepublish": "npm run test", | ||
"test": "./node_modules/.bin/nyc ./node_modules/.bin/ava", | ||
"tsc": "./node_modules/typescript/bin/tsc -d", | ||
"lint": "./node_modules/tslint/bin/tslint -c ./tslint.json ./{test,lib}/**/*.ts && echo '> \\033[0;32mlinter passed!\\033[0m'", | ||
"coverage": "./node_modules/.bin/nyc report --reporter=text-lcov > coverage.lcov && ./node_modules/.bin/codecov" | ||
"test": "ava", | ||
"tsc": "tsc -d", | ||
"watch": "tsc -w", | ||
"lint": "npm run prettier && tslint -p ./ --fix -c ./tslint.json ./{test,lib}/**/*.ts && echo '> \\033[0;32mlinter passed!\\033[0m'" | ||
}, | ||
@@ -20,42 +20,26 @@ "author": "bsouthga@gmail.com", | ||
"devDependencies": { | ||
"@types/body-parser": "0.0.32", | ||
"@types/express": "^4.0.32", | ||
"@types/hapi": "^13.0.34", | ||
"@types/koa": "^2.0.32", | ||
"@types/mongodb": "^2.1.32", | ||
"apollo-server": "^0.2.8", | ||
"ava": "^0.16.0", | ||
"babel-cli": "^6.14.0", | ||
"babel-core": "^6.14.0", | ||
"babel-preset-es2015-node4": "^2.1.0", | ||
"body-parser": "^1.15.2", | ||
"codecov": "^1.0.1", | ||
"express": "^4.14.0", | ||
"graphql-tools": "^0.7.2", | ||
"mongodb": "^2.2.10", | ||
"nyc": "^8.3.0", | ||
"tslint": "^3.15.1", | ||
"typed-graphql": "^1.0.1", | ||
"typescript": "^2.0.2", | ||
"tyranid": "^0.1.7" | ||
"@types/body-parser": "1.16.8", | ||
"@types/express": "^4.11.0", | ||
"@types/graphql": "^0.12.3", | ||
"@types/mongodb": "2.2.7", | ||
"ava": "^0.25.0", | ||
"body-parser": "^1.18.2", | ||
"express": "^4.16.2", | ||
"graphql-server-express": "^1.3.2", | ||
"graphql-tools": "^2.19.0", | ||
"mongodb": "^2.2.33", | ||
"prettier": "^1.10.2", | ||
"tslint": "^5.9.1", | ||
"tslint-config-prettier": "^1.6.0", | ||
"typescript": "^2.6.2", | ||
"tyranid": "^0.4.40" | ||
}, | ||
"dependencies": { | ||
"graphql": "^0.7.0" | ||
"graphql": "^0.12.3" | ||
}, | ||
"babel": { | ||
"presets": [ | ||
"es2015-node4" | ||
], | ||
"sourceMaps": "inline" | ||
}, | ||
"ava": { | ||
"files": [ | ||
"dist-node4/test/index.js" | ||
"dist/test/index.js" | ||
] | ||
}, | ||
"nyc": { | ||
"include": [ | ||
"dist-node4/src" | ||
] | ||
} | ||
} |
@@ -1,3 +0,7 @@ | ||
## GraphQL frontend for Tyranid [![npm version](https://badge.fury.io/js/tyranid-graphql.svg)](https://badge.fury.io/js/tyranid-graphql) [![Build Status](https://travis-ci.org/tyranid-org/tyranid-graphql.svg?branch=master)](https://travis-ci.org/tyranid-org/tyranid-graphql) [![codecov](https://codecov.io/gh/tyranid-org/tyranid-graphql/branch/master/graph/badge.svg)](https://codecov.io/gh/tyranid-org/tyranid-graphql) | ||
# GraphQL frontend for Tyranid | ||
[![npm version](https://badge.fury.io/js/tyranid-graphql.svg)](https://badge.fury.io/js/tyranid-graphql) | ||
[![Build Status](https://travis-ci.org/tyranid-org/tyranid-graphql.svg?branch=master)](https://travis-ci.org/tyranid-org/tyranid-graphql) | ||
[![codecov](https://codecov.io/gh/tyranid-org/tyranid-graphql/branch/master/graph/badge.svg)](https://codecov.io/gh/tyranid-org/tyranid-graphql) | ||
This library adds a graphql query interpreter for the [`tyranid`](https://github.com/tyranid-org/tyranid) | ||
@@ -18,17 +22,16 @@ mongodb ORM. The graphql schema is created from tyranid collection schemas using [`graphql-js`](https://github.com/graphql/graphql-js). | ||
const results = await Tyr.graphql({ | ||
query: ` | ||
query userTeams { | ||
users { | ||
name | ||
teamIds { | ||
name, | ||
organizationId { | ||
name | ||
} | ||
// template tag syntax | ||
const results = await Tyr.graphql` | ||
query userTeams { | ||
users { | ||
name | ||
teamIds { | ||
name, | ||
organizationId { | ||
name | ||
} | ||
} | ||
} | ||
` | ||
}); | ||
} | ||
`; | ||
@@ -35,0 +38,0 @@ console.log(users[1].teamIds[2].organizationId.name); // => "Chipotle" |
{ | ||
"compilerOptions": { | ||
"target": "es6", | ||
"target": "es2015", | ||
"module": "commonjs", | ||
"moduleResolution" : "node", | ||
"noImplicitAny": true, | ||
"strictNullChecks": true, | ||
"noImplicitThis": true, | ||
"noUnusedLocals": true, | ||
"noImplicitReturns": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"strict": true, | ||
"removeComments": false, | ||
"noLib": false, | ||
"skipLibCheck": true, | ||
"pretty": true, | ||
"outDir": "./dist-es2015/", | ||
"inlineSourceMap": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"experimentalDecorators": true | ||
"outDir": "./dist/", | ||
}, | ||
@@ -25,5 +18,4 @@ "files": [ | ||
"./test/example/server.ts", | ||
"./node_modules/typed-graphql/graphql.d.ts", | ||
"./src/tyranid-extensions.d.ts" | ||
] | ||
} |
{ | ||
"extends": ["tslint:latest", "tslint-config-prettier"], | ||
"rules": { | ||
"class-name": true, | ||
"comment-format": [ | ||
true, | ||
"check-space" | ||
], | ||
"indent": [ | ||
true, | ||
"spaces" | ||
], | ||
"comment-format": [true, "check-space"], | ||
"indent": [true, "spaces"], | ||
"no-duplicate-variable": true, | ||
@@ -18,19 +13,9 @@ "no-eval": true, | ||
"no-var-keyword": true, | ||
"one-line": [ | ||
true, | ||
"check-open-brace", | ||
"check-whitespace" | ||
], | ||
"quotemark": [ | ||
true, | ||
"single" | ||
], | ||
"semicolon": [ | ||
true, | ||
"always" | ||
], | ||
"triple-equals": [ | ||
true, | ||
"allow-null-check" | ||
], | ||
"no-conditional-assignment": false, | ||
"one-line": [true, "check-open-brace", "check-whitespace"], | ||
"object-literal-sort-keys": false, | ||
"no-implicit-dependencies": false, | ||
"quotemark": [true, "single"], | ||
"semicolon": [true, "always"], | ||
"triple-equals": [true, "allow-null-check"], | ||
"typedef-whitespace": [ | ||
@@ -46,6 +31,3 @@ true, | ||
], | ||
"variable-name": [ | ||
true, | ||
"ban-keywords" | ||
], | ||
"variable-name": [true, "ban-keywords"], | ||
"whitespace": [ | ||
@@ -60,2 +42,2 @@ true, | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
148504
15
204
9
61
1
+ Addedgraphql@0.12.3(transitive)
+ Addediterall@1.1.3(transitive)
- Removedgraphql@0.7.2(transitive)
- Removediterall@1.0.2(transitive)
Updatedgraphql@^0.12.3