New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@data-eden/codegen

Package Overview
Dependencies
Maintainers
4
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@data-eden/codegen

## Usage

0.13.0
Source
npm
Version published
Weekly downloads
56
5500%
Maintainers
4
Weekly downloads
 
Created
Source

@data-eden/codegen

Usage

When writing imports it is important to follow a pattern for queries, mutations and fragments.

As we want to avoid too much work in the babel side we assume convention to offset actual work to the codegen process.

Convention

This showcases the convention for Fragments, but the same applies to oeprations such as Queries and Mutations.

GOOD

const userFieldsFragment = gql`
  fragment UserFields on User {
    id
    username
    role
  }
`;

BAD

const UserFieldsFragment = gql`
  fragment UserFields on User {
    id
    username
    role
  }
`;
const userFields = gql`
  fragment UserFields on User {
    id
    username
    role
  }
`;

FAQs

Package last updated on 22 Jun 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