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

@graphql-codegen/add

Package Overview
Dependencies
Maintainers
4
Versions
4788
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphql-codegen/add

GraphQL Code Generator plugin for adding custom content to your output file

  • 3.2.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created

What is @graphql-codegen/add?

The @graphql-codegen/add package is a plugin for GraphQL Code Generator that allows you to prepend custom content to the output file. It is useful for adding custom imports, comments, or any other content that should be included at the top of the generated file.

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

Prepending custom content

This feature allows you to add custom text to the beginning of the generated file. In the code sample, a custom comment is added to the top of the file.

"plugins": [
  {
    "add": "// This is a custom comment added to the top of the file"
  }
]

Adding custom imports

With this feature, you can prepend custom import statements to your generated file. The code sample demonstrates how to add a custom import for a function.

"plugins": [
  {
    "add": "import myCustomFunction from './myCustomFunction';\n"
  }
]

Combining with other plugins

This feature showcases how @graphql-codegen/add can be used in conjunction with other plugins. The code sample prepends an eslint-disable comment before the rest of the code generated by the typescript and typescript-resolvers plugins.

"plugins": [
  {
    "add": "/* eslint-disable */\n"
  },
  "typescript",
  "typescript-resolvers"
]

Other packages similar to @graphql-codegen/add

FAQs

Package last updated on 08 Aug 2022

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