@agilys/custom-graphiql
Advanced tools
Comparing version 1.0.6 to 1.0.7
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
value: true | ||
}); | ||
exports.init = undefined; | ||
exports.expressCustomGraphiQL = undefined; | ||
var _react = require('react'); | ||
var _renderGraphiql = require('./utility/render-graphiql'); | ||
var React = _interopRequireWildcard(_react); | ||
var _renderGraphiql2 = _interopRequireDefault(_renderGraphiql); | ||
var _reactDom = require('react-dom'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var ReactDOM = _interopRequireWildcard(_reactDom); | ||
var expressCustomGraphiQL = function expressCustomGraphiQL(options) { | ||
return function (_req, res, next) { | ||
res.setHeader('Content-Type', 'text/html'); | ||
res.write((0, _renderGraphiql2.default)(options)); | ||
res.end(); | ||
next(); | ||
}; | ||
}; | ||
var _components = require('./components'); | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } | ||
function init(element, options) { | ||
ReactDOM.render(React.createElement(_components.CustomGraphiQL, options), element); | ||
} | ||
exports.init = init; | ||
exports.expressCustomGraphiQL = expressCustomGraphiQL; |
{ | ||
"name": "@agilys/custom-graphiql", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "A custom graphiql that allows to edit headers when sending the requests.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2377776
10
39363