Socket
Socket
Sign inDemoInstall

express-graphql

Package Overview
Dependencies
Maintainers
1
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.4.9 to 0.4.10

13

dist/index.js

@@ -56,2 +56,3 @@

var operationName = undefined;
var validationRules = undefined;

@@ -70,2 +71,7 @@ // Use promises as a mechanism for capturing any thrown errors during the

validationRules = _graphql.specifiedRules;
if (optionsObj.validationRules) {
validationRules = validationRules.concat(optionsObj.validationRules);
}
// GraphQL HTTP only supports GET and POST methods.

@@ -117,3 +123,3 @@ if (request.method !== 'GET' && request.method !== 'POST') {

// Validate AST, reporting any errors.
var validationErrors = (0, _graphql.validate)(schema, documentAST);
var validationErrors = (0, _graphql.validate)(schema, documentAST, validationRules);
if (validationErrors.length > 0) {

@@ -244,3 +250,8 @@ // Return 400: Bad Request if any validation errors exist.

/**
* An optional array of validation rules that will be applied on the document
* in aditional to the rules in the GraphQL spec
*/
/**
* A boolean to optionally enable GraphiQL mode.
*/

2

dist/renderGraphiQL.js

@@ -19,3 +19,3 @@

// Current latest version of GraphiQL.
var GRAPHIQL_VERSION = '0.4.9';
var GRAPHIQL_VERSION = '0.6.0';

@@ -22,0 +22,0 @@ /**

{
"name": "express-graphql",
"version": "0.4.9",
"version": "0.4.10",
"description": "Create a GraphQL HTTP server with Express.",

@@ -5,0 +5,0 @@ "contributors": [

@@ -39,3 +39,3 @@ GraphQL Express Middleware

provided, GraphQL's default spec-compliant [`formatError`][] function will
be used. *To enable stack traces, provide the function: `error => error`.*
be used.

@@ -46,2 +46,16 @@ * **`graphiql`**: If `true`, may present [GraphiQL][] when loaded directly

#### Debugging
During development, it's useful to get more information from errors, such as
stack traces. Providing a function to `formatError` enables this:
```js
formatError: error => ({
message: error.message,
locations: error.locations,
stack: error.stack
})
```
### HTTP Usage

@@ -48,0 +62,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