New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

graphql-codegen-typescript

Package Overview
Dependencies
Maintainers
1
Versions
123
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-codegen-typescript - npm Package Compare versions

Comparing version 0.19.0-alpha.c65acecf to 0.19.0-alpha.c89797e6

3

dist/commonjs/visitor.d.ts
import { BaseTypesVisitor, ParsedTypesConfig } from 'graphql-codegen-visitor-plugin-common';
import { TypeScriptPluginConfig } from './index';
import { FieldDefinitionNode, NamedTypeNode, ListTypeNode, NonNullTypeNode, EnumTypeDefinitionNode } from 'graphql';
import { FieldDefinitionNode, NamedTypeNode, ListTypeNode, NonNullTypeNode, EnumTypeDefinitionNode, InputValueDefinitionNode } from 'graphql';
export interface TypeScriptPluginParsedConfig extends ParsedTypesConfig {

@@ -19,3 +19,4 @@ avoidOptionals: boolean;

FieldDefinition(node: FieldDefinitionNode, key?: number | string, parent?: any): string;
InputValueDefinition(node: InputValueDefinitionNode, key?: number | string, parent?: any): string;
EnumTypeDefinition(node: EnumTypeDefinitionNode): string;
}

@@ -18,3 +18,3 @@ "use strict";

if (str.startsWith('Maybe')) {
return str.replace(/Maybe<(.*?)>/, '$1');
return str.replace(/Maybe<(.*?)>$/, '$1');
}

@@ -42,2 +42,7 @@ return str;

}
InputValueDefinition(node, key, parent) {
const originalFieldNode = parent[key];
const addOptionalSign = !this.config.avoidOptionals && originalFieldNode.type.kind !== graphql_1.Kind.NON_NULL_TYPE;
return graphql_codegen_visitor_plugin_common_1.indent(`${node.name}${addOptionalSign ? '?' : ''}: ${node.type},`);
}
EnumTypeDefinition(node) {

@@ -44,0 +49,0 @@ if (this.config.enumsAsTypes) {

import { BaseTypesVisitor, ParsedTypesConfig } from 'graphql-codegen-visitor-plugin-common';
import { TypeScriptPluginConfig } from './index';
import { FieldDefinitionNode, NamedTypeNode, ListTypeNode, NonNullTypeNode, EnumTypeDefinitionNode } from 'graphql';
import { FieldDefinitionNode, NamedTypeNode, ListTypeNode, NonNullTypeNode, EnumTypeDefinitionNode, InputValueDefinitionNode } from 'graphql';
export interface TypeScriptPluginParsedConfig extends ParsedTypesConfig {

@@ -19,3 +19,4 @@ avoidOptionals: boolean;

FieldDefinition(node: FieldDefinitionNode, key?: number | string, parent?: any): string;
InputValueDefinition(node: InputValueDefinitionNode, key?: number | string, parent?: any): string;
EnumTypeDefinition(node: EnumTypeDefinitionNode): string;
}

@@ -16,3 +16,3 @@ import { DeclarationBlock, indent, BaseTypesVisitor } from 'graphql-codegen-visitor-plugin-common';

if (str.startsWith('Maybe')) {
return str.replace(/Maybe<(.*?)>/, '$1');
return str.replace(/Maybe<(.*?)>$/, '$1');
}

@@ -40,2 +40,7 @@ return str;

}
InputValueDefinition(node, key, parent) {
const originalFieldNode = parent[key];
const addOptionalSign = !this.config.avoidOptionals && originalFieldNode.type.kind !== Kind.NON_NULL_TYPE;
return indent(`${node.name}${addOptionalSign ? '?' : ''}: ${node.type},`);
}
EnumTypeDefinition(node) {

@@ -42,0 +47,0 @@ if (this.config.enumsAsTypes) {

{
"name": "graphql-codegen-typescript",
"version": "0.19.0-alpha.c65acecf",
"version": "0.19.0-alpha.c89797e6",
"description": "GraphQL Code Generator plugin for generating TypeScript types",

@@ -12,4 +12,4 @@ "repository": "git@github.com:dotansimha/graphql-code-generator.git",

"dependencies": {
"graphql-codegen-plugin-helpers": "0.19.0-alpha.c65acecf",
"graphql-codegen-visitor-plugin-common": "0.19.0-alpha.c65acecf",
"graphql-codegen-plugin-helpers": "0.19.0-alpha.c89797e6",
"graphql-codegen-visitor-plugin-common": "0.19.0-alpha.c89797e6",
"tslib": "1.9.3"

@@ -19,3 +19,3 @@ },

"graphql": "14.1.1",
"graphql-codegen-testing": "0.19.0-alpha.c65acecf",
"graphql-codegen-testing": "0.19.0-alpha.c89797e6",
"jest": "24.5.0",

@@ -22,0 +22,0 @@ "ts-jest": "24.0.0",

Sorry, the diff of this file is not supported yet

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