gql-types-generator
Advanced tools
Comparing version 1.2.13 to 1.2.14
{ | ||
"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 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
68736
168