Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

babel-plugin-import-graphql

Package Overview
Dependencies
3
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.6.2 to 2.7.0

7

build/index.js

@@ -54,4 +54,9 @@ "use strict";

var jsFilename = file.opts.filename;
var _opts$extensions = opts.extensions,
extensions = _opts$extensions === void 0 ? [] : _opts$extensions;
extensions = _toConsumableArray(extensions).concat(['.graphql', '.gql']);
if (importPath.endsWith('.graphql') || importPath.endsWith('.gql')) {
if (extensions.some(function (extension) {
return importPath.endsWith(extension);
})) {
if (opts.runtime) {

@@ -58,0 +63,0 @@ try {

# ChangeLog
## v2.7.0 (March 3, 2019)
### Features
- Add `extensions` option to allow parsing custom file types like `.prisma` (:clap: @DaBs)
## v2.6.2 (June 29, 2018)

@@ -4,0 +10,0 @@

2

package.json
{
"name": "babel-plugin-import-graphql",
"version": "2.6.2",
"version": "2.7.0",
"description": "Babel plugin to make .gql/.graphql files importable",

@@ -5,0 +5,0 @@ "author": "A.J. Roberts <detrohutt@gmail.com>",

[![npm Version](https://img.shields.io/npm/v/babel-plugin-import-graphql.svg)](https://www.npmjs.com/package/babel-plugin-import-graphql)
[![npm Downloads](https://img.shields.io/npm/dt/babel-plugin-inline-import-graphql-ast.svg)](https://www.npmjs.com/package/babel-plugin-inline-import-graphql-ast)
[![npm Downloads](https://img.shields.io/npm/dm/babel-plugin-import-graphql.svg)](https://www.npmjs.com/package/babel-plugin-import-graphql)
[![npm License](https://img.shields.io/npm/l/babel-plugin-import-graphql.svg)](https://www.npmjs.com/package/babel-plugin-import-graphql)

@@ -186,3 +186,5 @@ [![donate](https://img.shields.io/badge/donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3AYURHRU7PMCL)

`runtime` | Boolean | false | **Enabling this option requires `graphql-tag` to be installed as a peerDependency.** -- Instead of inlining the parsed AST object, which is very large, this option inlines your GraphQL source code along with an import of the `gql` function from `graphql-tag` and parses your GraphQL source code with `gql` at runtime.
`extensions` | Array | [] | Enables loading GraphQL SDL files that have a custom extension, e.g. '.prisma'
## For users of create-react-app

@@ -189,0 +191,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc