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

extract-gql

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

extract-gql

A tool to extract GraphQL documents from projects.

  • 0.0.1-alpha
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

extract-gql

A utility for extracting graphql documents from multiple files into a single string.

Setup

This isn't published yet ... clone and use npm link or install it from a file path.

Usage

import { ExtractGQL } from 'extract-gql';

const extractor = new ExtractGQL();
const queryDocument = extractor.fromFiles([
  'path/to/oneQuery.graphl',
  'path/to/sourceFileWithEmbeddedGraphQL.js',
]);

If you have graphql documents embedded within your source files and use a template tag other than gql, then make sure to initialize your extractor accordingly.

const extractor = new ExtractGQL({ templateTag: 'MyTag' });

API

  • ExtractGQL#constructor (options: { templateTag: string }) => void
  • ExtractGQL#fromFiles (filePaths: string) => string
  • ExtractGQL#fromFile (filePath: string) => string
  • ExtractGQL#fromJS (filePath: string) => string
  • ExtractGQL#fromGraphQL (filePath: string) => string

`

More to come!

FAQs

Package last updated on 17 Apr 2017

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

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