Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

express-graphql

Package Overview
Dependencies
Maintainers
5
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-graphql - npm Package Compare versions

Comparing version 0.6.12 to 0.7.0

60

package.json
{
"name": "express-graphql",
"version": "0.6.12",
"version": "0.7.0",
"description": "Production ready GraphQL HTTP middleware.",

@@ -22,2 +22,5 @@ "license": "BSD-3-Clause",

],
"engines": {
"node": ">= 6.x"
},
"main": "dist/index.js",

@@ -47,5 +50,6 @@ "directories": {

"prepublish": ". ./resources/prepublish.sh",
"test": "npm run lint && npm run pretty-check && npm run check && npm run testonly",
"test": "npm run lint && npm run check && npm run testonly",
"testonly": "mocha $npm_package_options_mocha",
"lint": "eslint src",
"prettier": "prettier --write 'src/**/*.js'",
"check": "flow check",

@@ -57,4 +61,2 @@ "build": "rm -rf dist/* && babel src --ignore __tests__ --out-dir dist && npm run build:flow",

"cover:lcov": "babel-node node_modules/.bin/isparta cover --root src --report lcovonly node_modules/.bin/_mocha -- $npm_package_options_mocha",
"pretty": "node resources/pretty.js",
"pretty-check": "node resources/pretty.js --check",
"preversion": "npm test",

@@ -64,39 +66,39 @@ "start": "babel-node examples/index.js"

"dependencies": {
"accepts": "^1.3.0",
"accepts": "^1.3.5",
"content-type": "^1.0.4",
"http-errors": "^1.3.0",
"raw-body": "^2.3.2"
"http-errors": "^1.7.1",
"raw-body": "^2.3.3"
},
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-eslint": "^8.2.1",
"babel-cli": "6.26.0",
"babel-eslint": "10.0.1",
"babel-plugin-transform-async-to-generator": "6.24.1",
"babel-plugin-transform-class-properties": "6.24.1",
"babel-plugin-transform-flow-strip-types": "6.22.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-plugin-transform-runtime": "6.23.0",
"babel-preset-es2015": "6.24.1",
"babel-register": "^6.26.0",
"babel-runtime": "^6.26.0",
"body-parser": "1.18.2",
"chai": "^4.1.2",
"babel-register": "6.26.0",
"babel-runtime": "6.26.0",
"body-parser": "1.18.3",
"chai": "4.2.0",
"connect": "3.6.6",
"coveralls": "3.0.0",
"eslint": "^4.18.0",
"eslint-plugin-flowtype": "^2.44.0",
"express": "^4.16.2",
"express3": "*",
"flow-bin": "^0.65.0",
"graphql": "^0.13.1",
"isparta": "4.0.0",
"mocha": "5.0.1",
"multer": "1.3.0",
"prettier": "^1.10.2",
"coveralls": "3.0.2",
"eslint": "5.6.1",
"eslint-plugin-flowtype": "2.50.3",
"eslint-plugin-prettier": "3.0.0",
"express": "4.16.4",
"flow-bin": "0.83.0",
"graphql": "14.0.2",
"isparta": "4.1.0",
"mocha": "5.2.0",
"multer": "1.4.1",
"prettier": "1.14.3",
"restify": "4.3.2",
"sane": "2.4.1",
"sinon": "^4.3.0",
"supertest": "3.0.0"
"sane": "4.0.1",
"sinon": "6.3.5",
"supertest": "3.3.0"
},
"peerDependencies": {
"graphql": "^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0"
"graphql": "^0.12.0 || ^0.13.0 || ^14.0.0"
}
}

@@ -72,6 +72,6 @@ GraphQL HTTP Server Middleware

* **`rootValue`**: A value to pass as the `rootValue` to the `graphql()`
function from [`GraphQL.js/src/execute.js`](https://github.com/graphql/graphql-js/blob/master/src/execution/execute.js#L121).
function from [`GraphQL.js/src/execute.js`](https://github.com/graphql/graphql-js/blob/master/src/execution/execute.js#L119).
* **`context`**: A value to pass as the `context` to the `graphql()`
function from [`GraphQL.js/src/execute.js`](https://github.com/graphql/graphql-js/blob/master/src/execution/execute.js#L122). If `context` is not provided, the
function from [`GraphQL.js/src/execute.js`](https://github.com/graphql/graphql-js/blob/master/src/execution/execute.js#L120). If `context` is not provided, the
`request` object is passed as the context.

@@ -90,3 +90,3 @@

of resources consumed. This may be an async function. The function is
given one object as an argument: `{ document, variables, operationName, result }`.
given one object as an argument: `{ document, variables, operationName, result, context }`.

@@ -106,3 +106,3 @@ * **`validationRules`**: Optional additional validation rules queries must

schema: MyGraphQLSchema,
rootValue: await someFunctionToGetRootValue(request)
rootValue: await someFunctionToGetRootValue(request),
graphiql: true

@@ -207,3 +207,3 @@ })));

`{ document, variables, operationName, result }`
`{ document, variables, operationName, result, context }`

@@ -220,10 +220,14 @@ This example illustrates adding the amount of time consumed by running the

const extensions = ({ document, variables, operationName, result, context }) => {
return {
runTime: Date.now() - context.startTime
}
}
app.use('/graphql', graphqlHTTP(request => {
const startTime = Date.now();
return {
schema: MyGraphQLSchema,
context: { startTime: Date.now() },
graphiql: true,
extensions({ document, variables, operationName, result }) {
return { runTime: Date.now() - startTime };
}
extensions
};

@@ -230,0 +234,0 @@ }));

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc