File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -150,22 +150,21 @@ export default class SchemaPlugin extends Plugin implements PluginInterface {
150
150
}
151
151
152
152
argumentDescription ( arg : InputValue ) : string [ ] {
153
-
154
- const desc = arg . description === null ?
153
+ const desc = ! arg . description ?
155
154
'[' + this . html . highlight ( 'Not documented' ) + ']' : arg . description ;
156
155
157
156
return this . description ( this . html . highlight ( arg . name ) + ': ' + desc ) ;
158
157
}
159
158
160
159
argumentsDescription ( fieldOrDirectives : Field | Directive ) : string [ ] {
161
-
162
- if ( fieldOrDirectives . args . length === 0 ) {
160
+ const argsWithDescriptions = fieldOrDirectives . args . filter ( arg => arg . description ) ;
161
+ if ( argsWithDescriptions . length === 0 ) {
163
162
return [ ] ;
164
163
}
165
164
166
165
const reduceArguments = ( descriptions : string [ ] , arg : InputValue ) => descriptions . concat ( this . argumentDescription ( arg ) ) ;
167
166
168
- return fieldOrDirectives . args
167
+ return argsWithDescriptions
169
168
. reduce ( reduceArguments , [ this . html . comment ( 'Arguments' ) ] ) ;
170
169
}
171
170
You can’t perform that action at this time.
0 commit comments