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

graphql-codegen-generators

Package Overview
Dependencies
Maintainers
1
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-codegen-generators - npm Package Compare versions

Comparing version 0.9.0-alpha.80022c38 to 0.9.0-alpha.86a530fd

16

dist/index.js

@@ -119,3 +119,3 @@ (function(e, a) { for(var i in a) e[i] = a[i]; }(exports, /******/ (function(modules) { // webpackBootstrap

module.exports = "{{#each this}}\n{{ name }}: {{ toPrimitive type }}{{#if isArray}}[]{{/if}}{{#unless isRequired}} | null{{/unless}}; {{#if description }} // {{description}}{{/if}}\n{{/each}}"
module.exports = "{{#each this}}\n{{ name }}{{#unless isRequired}}?{{/unless}}: {{ toPrimitive type }}{{#if isArray}}[]{{/if}}{{#unless isRequired}} | null{{/unless}}; {{#if description }} // {{description}}{{/if}}\n{{/each}}"

@@ -185,3 +185,3 @@ /***/ }),

module.exports = "/* tslint:disable */\n{{> schema }}\n{{> documents }}\n"
module.exports = "/* tslint:disable */\n{{#if config.printTime }}\n// Generated in {{ currentTime }}\n{{/if}}\n{{> schema }}\n{{> documents }}\n"

@@ -192,3 +192,3 @@ /***/ }),

module.exports = "{{ toComment description }}\nexport interface {{ name }}{{#if hasInterfaces}} extends {{#each interfaces}}{{this}}{{#unless @last}},{{/unless}}{{/each}}{{/if}} {\n{{#each fields}}\n {{ name }}: {{ toPrimitive type }}{{#if isArray}}[]{{/if}}{{#unless isRequired}} | null{{/unless}}; {{ toComment description }}\n{{/each}}\n}\n"
module.exports = "{{ toComment description }}\nexport interface {{ name }}{{#if hasInterfaces}} extends {{#each interfaces}}{{this}}{{#unless @last}},{{/unless}}{{/each}}{{/if}} {\n{{#each fields}}\n {{ name }}{{#unless isRequired}}?{{/unless}}: {{ toPrimitive type }}{{#if isArray}}[]{{/if}}{{#unless isRequired}} | null{{/unless}}; {{ toComment description }}\n{{/each}}\n}\n"

@@ -199,3 +199,3 @@ /***/ }),

module.exports = "{{#each scalars}}\n\n{{ toComment description }}\nexport type {{ name }} = any;\n{{/each}}\n{{#each interfaces}}\n {{~> type }}\n{{/each}}\n{{#each types}}\n {{~> type }}\n{{/each}}\n{{#each inputTypes}}\n {{~> type }}\n{{/each}}\n{{~#each types}}\n {{~#each fields}}\n {{~# if hasArguments }}\nexport interface {{ toPascalCase name }}{{ toPascalCase ../name }}Args {\n{{#each arguments}}\n {{ name }}: {{ toPrimitive type }}{{#if isArray}}[]{{/if}}{{#unless isRequired}} | null{{/unless}}; {{ toComment description }}\n{{/each}}\n}\n {{/if}}\n {{/each}}\n{{/each}}\n{{#each enums}}\n{{ toComment description }}\nexport type {{ name }} = {{#each values }}\"{{ value }}\"{{#unless @last}} | {{/unless}}{{/each}};\n\n{{/each}}\n{{#each unions}}\n{{ toComment description }}\nexport type {{ name }} = {{#each possibleTypes}}{{this}}{{#unless @last}} | {{/unless}}{{/each}};\n\n{{/each}}\n"
module.exports = "{{#each scalars}}\n\n{{ toComment description }}\nexport type {{ name }} = any;\n{{/each}}\n{{#each interfaces}}\n {{~> type }}\n{{/each}}\n{{#each types}}\n {{~> type }}\n{{/each}}\n{{#each inputTypes}}\n {{~> type }}\n{{/each}}\n{{~#each types}}\n {{~#each fields}}\n {{~# if hasArguments }}\nexport interface {{ toPascalCase name }}{{ toPascalCase ../name }}Args {\n{{#each arguments}}\n {{ name }}{{#unless isRequired}}?{{/unless}}: {{ toPrimitive type }}{{#if isArray}}[]{{/if}}{{#unless isRequired}} | null{{/unless}}; {{ toComment description }}\n{{/each}}\n}\n {{/if}}\n {{/each}}\n{{/each}}\n{{#each enums}}\n{{ toComment description }}\nexport enum {{ name }} {\n {{#each values }}{{value}} = \"{{ value }}\",{{#unless @last}}\n {{/unless}}{{/each}}\n}\n\n{{/each}}\n{{#each unions}}\n{{ toComment description }}\nexport type {{ name }} = {{#each possibleTypes}}{{this}}{{#unless @last}} | {{/unless}}{{/each}};\n\n{{/each}}\n"

@@ -206,3 +206,3 @@ /***/ }),

module.exports = "{{#each operations }}\nexport namespace {{ toPascalCase name }} {\n export type Variables = {\n {{#each variables}}\n {{ name }}: {{ toPrimitive type }}{{#if isArray}}[]{{/if}}{{#unless isRequired}} | null{{/unless}};\n {{/each}}\n }\n\n export type {{ toPascalCase operationType }} = {\n {{> selectionSet fields }}\n }{{#if hasFragmentsSpread}}{{#each fragmentsSpread}} & {{fragmentName}}.Fragment{{/each}}{{/if}}{{#if hasInlineFragments}}{{#each inlineFragments}} & {{onType}}{{/each}}{{/if}}\n {{#each innerModels }}\n\n export type {{ modelType }} = {\n {{> selectionSet fields }}\n }{{#if hasFragmentsSpread}}{{#each fragmentsSpread}} & {{fragmentName}}.Fragment{{/each}}{{/if}}{{#if hasInlineFragments}}{{#each inlineFragments}} & {{onType}}{{/each}}{{/if}}\n {{/each}}\n}\n{{/each}}\n{{#each fragments }}\n\nexport namespace {{name}} {\n export type Fragment = {\n {{> selectionSet fields }}\n }{{#if hasFragmentsSpread}}{{#each fragmentsSpread}} & {{fragmentName}}.Fragment{{/each}}{{/if}}{{#if hasInlineFragments}}{{#each inlineFragments}} & {{onType}}{{/each}}{{/if}}\n {{#each innerModels }}\n\n export type {{ modelType }} = {\n {{> selectionSet fields }}\n }{{#if hasFragmentsSpread}}{{#each fragmentsSpread}} & {{fragmentName}}.Fragment{{/each}}{{/if}}{{#if hasInlineFragments}}{{#each inlineFragments}} & {{onType}}{{/each}}{{/if}}\n {{/each}}\n}\n{{/each}}"
module.exports = "{{#each operations }}\nexport namespace {{ toPascalCase name }} {\n export type Variables = {\n {{#each variables}}\n {{ name }}{{#unless isRequired}}?{{/unless}}: {{ toPrimitive type }}{{#if isArray}}[]{{/if}}{{#unless isRequired}} | null{{/unless}};\n {{/each}}\n }\n\n export type {{ toPascalCase operationType }} ={{#if hasFields}} {\n {{> selectionSet fields }}\n }{{/if}} {{#if hasFragmentsSpread}}{{#if hasFields}}& {{/if}}{{#each fragmentsSpread}}{{fragmentName}}.Fragment{{#unless @last}} & {{/unless}}{{/each}}{{/if}}{{#if hasInlineFragments}}{{#if hasFields}}& {{/if}}{{#each inlineFragments}}{{onType}}{{#unless @last}} & {{/unless}}{{/each}}{{/if}}\n {{#each innerModels }}\n\n export type {{ modelType }} ={{#if hasFields}} {\n {{> selectionSet fields }}\n }{{/if}} {{#if hasFragmentsSpread}}{{#if hasFields}}& {{/if}}{{#each fragmentsSpread}}{{fragmentName}}.Fragment{{#unless @last}} & {{/unless}}{{/each}}{{/if}}{{#if hasInlineFragments}}{{#if hasFields}}& {{/if}}{{#each inlineFragments}}{{onType}}{{#unless @last}} & {{/unless}}{{/each}}{{/if}}\n {{/each}}\n}\n{{/each}}\n{{#each fragments }}\n\nexport namespace {{name}} {\n export type Fragment ={{#if hasFields}} {\n {{> selectionSet fields }}\n }{{/if}} {{#if hasFragmentsSpread}}{{#if hasFields}}& {{/if}}{{#each fragmentsSpread}}{{fragmentName}}.Fragment{{#unless @last}} & {{/unless}}{{/each}}{{/if}}{{#if hasInlineFragments}}{{#if hasFields}}& {{/if}}{{#each inlineFragments}}{{onType}}{{#unless @last}} & {{/unless}}{{/each}}{{/if}}\n {{#each innerModels }}\n\n export type {{ modelType }} ={{#if hasFields}} {\n {{> selectionSet fields }}\n }{{/if}} {{#if hasFragmentsSpread}}{{#if hasFields}}& {{/if}}{{#each fragmentsSpread}}{{fragmentName}}.Fragment{{#unless @last}} & {{/unless}}{{/each}}{{/if}}{{#if hasInlineFragments}}{{#if hasFields}}& {{/if}}{{#each inlineFragments}}{{onType}}{{#unless @last}} & {{/unless}}{{/each}}{{/if}}\n {{/each}}\n}\n{{/each}}"

@@ -213,3 +213,3 @@ /***/ }),

module.exports = "{{#eachImport this }}\nimport { {{ name }} } from './{{ file }}';\n{{/eachImport}}\n{{ toComment description }}\nexport interface {{ name }}{{#if hasInterfaces}} extends {{#each interfaces}}{{this}}{{#unless @last}},{{/unless}}{{/each}}{{/if}} {\n{{#each fields}}\n {{ name }}: {{ toPrimitive type }}{{#if isArray}}[]{{/if}}{{#unless isRequired}} | null{{/unless}}; {{ toComment description }}\n{{/each}}\n}\n\n{{#each fields}}\n {{~# if hasArguments }}\nexport interface {{ toPascalCase name }}{{ toPascalCase ../name }}Args {\n{{#each arguments}}\n {{ name }}: {{ toPrimitive type }}{{#if isArray}}[]{{/if}}{{#unless isRequired}} | null{{/unless}}; {{ toComment description }}\n{{/each}}\n}\n {{/if}}\n{{/each}}"
module.exports = "{{#eachImport this }}\nimport { {{ name }} } from './{{ file }}';\n{{/eachImport}}\n{{ toComment description }}\nexport interface {{ name }}{{#if hasInterfaces}} extends {{#each interfaces}}{{this}}{{#unless @last}},{{/unless}}{{/each}}{{/if}} {\n{{#each fields}}\n {{ name }}{{#unless isRequired}}?{{/unless}}: {{ toPrimitive type }}{{#if isArray}}[]{{/if}}{{#unless isRequired}} | null{{/unless}}; {{ toComment description }}\n{{/each}}\n}\n\n{{#each fields}}\n {{~# if hasArguments }}\nexport interface {{ toPascalCase name }}{{ toPascalCase ../name }}Args {\n{{#each arguments}}\n {{ name }}{{#unless isRequired}}?{{/unless}}: {{ toPrimitive type }}{{#if isArray}}[]{{/if}}{{#unless isRequired}} | null{{/unless}}; {{ toComment description }}\n{{/each}}\n}\n {{/if}}\n{{/each}}"

@@ -220,3 +220,3 @@ /***/ }),

module.exports = "{{ toComment description }}\nexport type {{ name }} = {{#each values }}\"{{ value }}\"{{#unless @last}} | {{/unless}}{{/each}};"
module.exports = "{{ toComment description }}\nexport enum {{ name }} {\n {{#each values }}{{value}} = \"{{ value }}\",{{#unless @last}}\n {{/unless}}{{/each}}\n}"

@@ -239,3 +239,3 @@ /***/ }),

module.exports = "{{#eachImport this }}\nimport { {{ name }} } from './{{ file }}';\n{{/eachImport}}\nexport namespace {{ toPascalCase name }} {\n export type Variables = {\n{{#each variables}}\n {{ name }}: {{ toPrimitive type }}{{#if isArray}}[]{{/if}}{{#unless isRequired}} | null{{/unless}};\n{{/each}}\n }\n\n export type {{ toPascalCase operationType }} = {\n {{> selectionSet fields }}\n } {{#if hasFragmentsSpread}}{{#each fragmentsSpread}} & {{fragmentName}}.Fragment{{/each}}{{/if}}{{#if hasInlineFragments}}{{#each inlineFragments}} & {{onType}}{{/each}}{{/if}}\n{{#each innerModels }}\n\n export type {{ modelType }} = {\n {{> selectionSet fields }}\n }{{#if hasFragmentsSpread}}{{#each fragmentsSpread}} & {{fragmentName}}.Fragment{{/each}}{{/if}}{{#if hasInlineFragments}}{{#each inlineFragments}} & {{onType}}{{/each}}{{/if}}\n{{/each}}\n}\n"
module.exports = "{{#eachImport this }}\nimport { {{ name }} } from './{{ file }}';\n{{/eachImport}}\nexport namespace {{ toPascalCase name }} {\n export type Variables = {\n{{#each variables}}\n {{ name }}{{#unless isRequired}}?{{/unless}}: {{ toPrimitive type }}{{#if isArray}}[]{{/if}}{{#unless isRequired}} | null{{/unless}};\n{{/each}}\n }\n\n export type {{ toPascalCase operationType }} ={{#if hasFields}} {\n {{> selectionSet fields }}\n }{{/if}} {{#if hasFragmentsSpread}}{{#if hasFields}}& {{/if}}{{#each fragmentsSpread}}{{fragmentName}}.Fragment{{#unless @last}} & {{/unless}}{{/each}}{{/if}}{{#if hasInlineFragments}}{{#if hasFields}}& {{/if}}{{#each inlineFragments}}{{onType}}{{#unless @last}} & {{/unless}}{{/each}}{{/if}}\n {{#each innerModels }}\n\n export type {{ modelType }} ={{#if hasFields}} {\n {{> selectionSet fields }}\n }{{/if}} {{#if hasFragmentsSpread}}{{#if hasFields}}& {{/if}}{{#each fragmentsSpread}}{{fragmentName}}.Fragment{{#unless @last}} & {{/unless}}{{/each}}{{/if}}{{#if hasInlineFragments}}{{#if hasFields}}& {{/if}}{{#each inlineFragments}}{{onType}}{{#unless @last}} & {{/unless}}{{/each}}{{/if}}\n {{/each}}\n}\n"

@@ -242,0 +242,0 @@ /***/ }),

@@ -9,2 +9,5 @@ export declare const EInputType: {

flattenTypes: boolean;
config?: {
[configName: string]: any;
};
templates: {

@@ -22,2 +25,5 @@ [templateName: string]: string | string[];

filesExtension?: string;
customHelpers?: {
[helperName: string]: Function;
};
}
{
"name": "graphql-codegen-generators",
"version": "0.9.0-alpha.80022c38",
"version": "0.9.0-alpha.86a530fd",
"description": "GraphQL code generator predefined templates",

@@ -18,6 +18,6 @@ "license": "MIT",

"main": "./dist/index.js",
"typings": "dist/src/index.d.ts",
"typings": "dist/index.d.ts",
"typescript": {
"definition": "dist/src/index.d.ts"
"definition": "dist/index.d.ts"
}
}

@@ -240,1 +240,7 @@ # `graphql-code-generators`

Use with `MULTIPLE_FILES`, specify the file extension for the generated files.
### customHelpers
With `customHelpers` you can add custom helpers that executes with your custom templates.
Provide an object with `key` as the name of the helper, and a `Function` for the helper execution.

Sorry, the diff of this file is not supported yet

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