New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@graphql-reshape/transformers

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphql-reshape/transformers

A collections of transformers that parse graphql schema definition language, add specific directives to qualifying fields, and return the parsed document

latest
Source
npmnpm
Version
0.5.1
Version published
Maintainers
1
Created
Source

@graphql-reshape/transformers

GraphQL Reshape Logo

How to install

npm i @graphql-reshape/transformers

string -> [DocumentNode | string , boolean]

What is a transformer in this context?

A transformer is a function that takes in a graphql schema definition language (SDL) as a string and returns an array where the first element is the parsed schema or original string if not parsable and the second element is a boolean representing if the transform changed anything.

A transformer also can take an optional second argument which is an object that holds specific options for the transformer

How to use

Import the transformer directly and apply call it with a graphl schema (DocumentNode | string). This will return a parsed schema AST with the directive added. Typically you can then print the DocumentNode if you wanted to get back to the graphl schema definition language or you can pass the parsed DocumentNode to some function that can consume it like Apollo's makeExecutableSchema()

Keywords

graphql

FAQs

Package last updated on 04 Oct 2020

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