Socket
Book a DemoInstallSign in
Socket

@labdigital/graphql-codegen-bruno

Package Overview
Dependencies
Maintainers
5
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@labdigital/graphql-codegen-bruno

This plugin generates a directory with [Bruno](https://github.com/usebruno/bruno) files with all GraphQL queries in your codebase

1.3.1
latest
Source
npmnpm
Version published
Weekly downloads
802
-20.99%
Maintainers
5
Weekly downloads
 
Created
Source

GraphQL Codegen Bruno Plugin

This plugin generates a directory with Bruno files with all GraphQL queries in your codebase

Installation

pnpm add -d @labdigital/graphql-codegen-bruno

Usage

Create a codegen.ts file in the root of your project with the following content:

import type { CodegenConfig } from "@graphql-codegen/cli";

const config: CodegenConfig = {
	schema:
		"schema.graphql",
	documents: [
		"src/**/*.{ts,tsx}"
	],
	generates: {
		// Generate Bruno files in the api-collection directory
		"api-collection/generated.json": {
			plugins: ["@labdigital/graphql-codegen-bruno"],
			config: {

				// Clean the output directory before generating the files
				clean: true

				// Set default values for the generated Bruno variables
				defaults: {
					locale: "nl-NL",
					currency: "EUR"
			}
		},
	},
};

export default config;

Then run the following command:

pnpx graphql-codegen --config codegen.ts

Notes

The api-collection/generated.json seems to be needed for GraphQL codegen to work (we need to generate a file, not a directory). If you know a way to generate a directory instead of a file, please us know

FAQs

Package last updated on 27 Apr 2025

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.