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

gql-types-generator

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gql-types-generator - npm Package Compare versions

Comparing version 1.2.13 to 1.2.14

2

package.json
{
"name": "gql-types-generator",
"version": "1.2.13",
"version": "1.2.14",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "types": "dist/index.d.ts",

@@ -15,3 +15,4 @@ gql-types-generator

Package to generate types depending on GraphQL scheme, mutations and queries.
Package to generate TypeScript types depending on GraphQL scheme, mutations and
queries.

@@ -49,2 +50,21 @@ ## Install

As a result, command creates a directory on passed `--output-directory` path,
generates files `schema.d.ts` and `schema.js`:
- `schema.d.ts` contains all schema types and by default exports constant `schema: string` which
is a text representation of schema
- `schema.js` exports by default text representation of schema (`modules.exports = ' ... ';`)
If `--operations` was passed, command is searching for operations and creates a
pair of `.d.ts` and `.js` files for each found operation. Name of each created
file depends on original operation name and its type. So, if operation was
`query getUsers { ... }`, created files will be `getUsersQuery.d.ts` and
`getUsersQuery.js`.
- `.d.ts` by default exports string which is a text representation of operation.
Additionally file contains types connected with operation. They can be:
- Operation return type (for example, `GetUsersQuery`)
- Operation variables type (for example, `GetUsersQueryVariables`)
- `.js` exports by default text representation of operation (`modules.exports = ' ... ';`)
## Programmatic control

@@ -51,0 +71,0 @@ Library provides such functions as `compile`, `compileSchema` and

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