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.18.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
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 03 Aug 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

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