@graphql-codegen/jsdoc
Advanced tools
Comparing version 1.15.1-alpha-849662d9.10 to 1.15.1-alpha-871522fe.29
@@ -35,2 +35,8 @@ 'use strict'; | ||
}, | ||
InputObjectTypeDefinition: { | ||
leave(node) { | ||
const typedNode = node; | ||
return createDocBlock([`@typedef {Object} ${typedNode.name}`, ...typedNode.fields]); | ||
}, | ||
}, | ||
InterfaceTypeDefinition: { | ||
@@ -82,2 +88,14 @@ leave(node) { | ||
}, | ||
InputValueDefinition: { | ||
enter(node) { | ||
if (node.type.kind === 'NonNullType') { | ||
return { ...node, nonNullable: true }; | ||
} | ||
return node; | ||
}, | ||
leave(node) { | ||
const fieldName = node.nonNullable ? node.name : `[${node.name}]`; | ||
return `@property {${node.type}} ${fieldName}`; | ||
}, | ||
}, | ||
ListType: { | ||
@@ -84,0 +102,0 @@ enter(node) { |
@@ -31,2 +31,8 @@ import { parse, printSchema, concatAST, visit } from 'graphql'; | ||
}, | ||
InputObjectTypeDefinition: { | ||
leave(node) { | ||
const typedNode = node; | ||
return createDocBlock([`@typedef {Object} ${typedNode.name}`, ...typedNode.fields]); | ||
}, | ||
}, | ||
InterfaceTypeDefinition: { | ||
@@ -78,2 +84,14 @@ leave(node) { | ||
}, | ||
InputValueDefinition: { | ||
enter(node) { | ||
if (node.type.kind === 'NonNullType') { | ||
return { ...node, nonNullable: true }; | ||
} | ||
return node; | ||
}, | ||
leave(node) { | ||
const fieldName = node.nonNullable ? node.name : `[${node.name}]`; | ||
return `@property {${node.type}} ${fieldName}`; | ||
}, | ||
}, | ||
ListType: { | ||
@@ -80,0 +98,0 @@ enter(node) { |
{ | ||
"name": "@graphql-codegen/jsdoc", | ||
"version": "1.15.1-alpha-849662d9.10+849662d9", | ||
"version": "1.15.1-alpha-871522fe.29+871522fe", | ||
"description": "GraphQL Code Generator plugin for generating JSDoc based types for GraphQL queries, mutations, subscriptions and fragments", | ||
@@ -9,4 +9,4 @@ "peerDependencies": { | ||
"dependencies": { | ||
"@graphql-codegen/plugin-helpers": "1.15.1-alpha-849662d9.10+849662d9", | ||
"@graphql-codegen/visitor-plugin-common": "1.15.1-alpha-849662d9.10+849662d9", | ||
"@graphql-codegen/plugin-helpers": "1.15.1-alpha-871522fe.29+871522fe", | ||
"@graphql-codegen/visitor-plugin-common": "1.15.1-alpha-871522fe.29+871522fe", | ||
"tslib": "~2.0.0" | ||
@@ -13,0 +13,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
27962
253