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

@graphql-codegen/plugin-helpers

Package Overview
Dependencies
Maintainers
5
Versions
5514
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphql-codegen/plugin-helpers

GraphQL Code Generator common utils and types

  • 1.15.1-alpha-2c34ad8f.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
5
Weekly downloads
 
Created

What is @graphql-codegen/plugin-helpers?

The @graphql-codegen/plugin-helpers package provides utility functions and types that are used to develop plugins for GraphQL Code Generator. It helps with the creation of custom plugins by providing common functionalities such as schema and document handling, plugin validation, and configuration management.

What are @graphql-codegen/plugin-helpers's main functionalities?

Validate Plugins

This feature allows developers to validate the structure of plugins to ensure they conform to the expected interface required by GraphQL Code Generator.

const { validatePlugins } = require('@graphql-codegen/plugin-helpers');

const plugins = [
  { plugin: require('some-graphql-codegen-plugin') }
];

validatePlugins(plugins);

Normalize Output Parameters

This utility normalizes output parameters, which can be used to handle file paths and names in a consistent manner across different plugins.

const { normalizeOutputParam } = require('@graphql-codegen/plugin-helpers');

const output = 'path/to/output.ts';
const normalizedOutput = normalizeOutputParam(output);

Create Schema AST

This function is used to create a GraphQL schema AST from a GraphQL schema object, which can then be used by plugins to generate code.

const { createSchemaAst } = require('@graphql-codegen/plugin-helpers');
const { buildSchema } = require('graphql');

const schema = buildSchema(`type Query { hello: String }`);
const schemaAst = createSchemaAst(schema);

Other packages similar to @graphql-codegen/plugin-helpers

FAQs

Package last updated on 26 May 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

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