🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

react-graphql-syntax-highlighter

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-graphql-syntax-highlighter

A React component for highlighting GraphQL syntax.

0.0.4
latest
Source
npm
Version published
Maintainers
1
Created
Source

GraphQL syntax highlighting React component

Installation

yarn add react-graphql-syntax-highlighter

Example usage

import { GraphQLCodeBlock } from 'react-graphql-syntax-highlighter';
import 'react-graphql-syntax-highlighter/dist/style.css';
import React from 'react';

interface Props {
  code: string;
}

export const GraphqlCodeBlock: React.FC<Props> = ({ code }) => (
  <GraphQLCodeBlock src={code} />
);

The components only takes two props: className and code. code is a graphql query string.

Keywords

graphql

FAQs

Package last updated on 21 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts