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

graphql-syntax-highlighter-react

Package Overview
Dependencies
Maintainers
3
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-syntax-highlighter-react - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

.github/ISSUE_TEMPLATE.md

12

dist/GraphqlCodeBlock.js

@@ -53,4 +53,14 @@ 'use strict';

var formatted = (0, _printer.print)((0, _parser.parse)(queryBody));
var formatted = void 0;
try {
formatted = (0, _printer.print)((0, _parser.parse)(queryBody));
} catch (e) {
return _react2.default.createElement(
'div',
{ className: className },
'Could not parse graphQL query'
);
}
var highlighted = [];

@@ -57,0 +67,0 @@ var rowKeys = [];

5

package.json
{
"name": "graphql-syntax-highlighter-react",
"version": "0.3.1",
"version": "0.3.2",
"description": "A React component for highlighting GraphQL syntax.",

@@ -31,4 +31,3 @@ "main": "dist/index.js",

"babel-preset-es2015": "^6.13.2",
"babel-preset-react": "^6.11.1",
"mocha": "^4.0.1"
"babel-preset-react": "^6.11.1"
},

@@ -35,0 +34,0 @@ "peerDependencies": {

@@ -17,4 +17,10 @@ import { LexRules, ParseRules, isIgnored } from './utils/Rules.js';

const { className, queryBody } = this.props;
const formatted = print(parse(queryBody));
let formatted;
try {
formatted = print(parse(queryBody));
} catch (e) {
return (<div className={className}>Could not parse graphQL query</div>);
}
const highlighted = [];

@@ -21,0 +27,0 @@ const rowKeys = [];

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