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

@graphql-codegen/typescript-operations

Package Overview
Dependencies
Maintainers
5
Versions
5928
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphql-codegen/typescript-operations

GraphQL Code Generator plugin for generating TypeScript types for GraphQL queries, mutations, subscriptions and fragments

  • 1.0.4-alpha-cbc1482d.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.4M
decreased by-18.12%
Maintainers
5
Weekly downloads
 
Created

What is @graphql-codegen/typescript-operations?

The @graphql-codegen/typescript-operations package is a plugin for GraphQL Code Generator that generates TypeScript typings for GraphQL operations (queries, mutations, and subscriptions). It helps in creating type-safe and easy-to-use TypeScript types based on your GraphQL schema and operations, enhancing development efficiency and reducing runtime errors.

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

Type generation for queries

Generates TypeScript interfaces for the 'GetUsers' query, allowing for type-safe usage of query results.

query GetUsers {
  users {
    id
    name
  }
}

Type generation for mutations

Generates TypeScript types for the 'CreateUser' mutation, including the mutation function and its parameters, facilitating type-safe API interactions.

mutation CreateUser($input: CreateUserInput!) {
  createUser(input: $input) {
    id
    name
  }
}

Type generation for subscriptions

Generates TypeScript types for the 'OnUserCreated' subscription, enabling type-safe real-time data handling.

subscription OnUserCreated {
  userCreated {
    id
    name
  }
}

Other packages similar to @graphql-codegen/typescript-operations

FAQs

Package last updated on 24 Mar 2019

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