📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP

@nxify-io/graphql-codegen

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nxify-io/graphql-codegen

An Nx plugin for GraphQL Code Generator containing executors and generators allowing you to configure and run `graphql-codegen` in your workspace.

0.0.2
next
latest
Version published
Weekly downloads
221
-12.65%
Maintainers
1
Weekly downloads
 
Created

@nxify-io/graphql-codegen

An Nx plugin to use the GraphQL Code Generator in an Nx workspace. Currently, the client preset is configured by default.

Getting Started

This plugin assumes you already have an Nx workspace and at least one library where you intend to configure code generation.

Install the plugin:

yarn add -D @nxify-io/graphql-codegen

Generate Configuration

The configuration generator will configure a project in the workspace with a codegen.ts file and codegen executor target.

@nxify-io/graphql-codegen:configuration

Adds the GraphQL Code Generator configuration files for a given project and, if needed, installs the necessary packages for the GraphQL Code Generator to work.

Usage

nx generate @nxify-io/graphql-codegen:configuration --project=my-project

By default, this generator will create a codegen.ts file in the project root configured with the client preset and to generate source files in {projectRoot}/src/lib/generated.

Run the Code Generator

The codegen executor will handle running graphql-codegen with the project specific codegen.ts configuration.

@nxify-io/graphql-codegen:codegen

Runs graphql-codegen in the current project.

Options

Valid graphql-codegen options can be configured in project.json when defining the executor or when invoking it. Currently watch is the only officially supported option and any additional options will be passed to the process.

FAQs

Package last updated on 16 Sep 2023

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