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
5512
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.0.7-alpha-2ac7caba.35
  • Source
  • npm
  • Socket score

Version published
Maintainers
5
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 03 Apr 2019

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