Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@graphql-codegen/plugin-helpers
Advanced tools
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.
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);
The graphql-tools package is a set of utilities for working with GraphQL schemas in JavaScript. It provides functionalities for schema stitching, mocking, and more. While it overlaps with some of the schema handling features of @graphql-codegen/plugin-helpers, it is more focused on schema manipulation rather than code generation plugin development.
graphql-config is a tool for loading GraphQL configuration files. It helps developers manage and share configurations for their GraphQL projects. While it also deals with GraphQL configurations, it is not specifically tailored for code generation plugin development like @graphql-codegen/plugin-helpers.
FAQs
GraphQL Code Generator common utils and types
The npm package @graphql-codegen/plugin-helpers receives a total of 5,786,570 weekly downloads. As such, @graphql-codegen/plugin-helpers popularity was classified as popular.
We found that @graphql-codegen/plugin-helpers demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.