Skip to content

Commit

Permalink
GraphQLArgument: make 'description' undefined by default (#2132)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed Sep 15, 2019
1 parent 564e35a commit 4c4df72
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/type/__tests__/definition-test.js
Expand Up @@ -243,7 +243,7 @@ describe('Type System: Objects', () => {
args: [
{
name: 'arg',
description: null,
description: undefined,
type: ScalarType,
defaultValue: undefined,
extensions: undefined,
Expand Down
4 changes: 2 additions & 2 deletions src/type/__tests__/directive-test.js
Expand Up @@ -36,15 +36,15 @@ describe('Type System: Directive', () => {
args: [
{
name: 'foo',
description: null,
description: undefined,
type: GraphQLString,
defaultValue: undefined,
extensions: undefined,
astNode: undefined,
},
{
name: 'bar',
description: null,
description: undefined,
type: GraphQLInt,
defaultValue: undefined,
extensions: undefined,
Expand Down
2 changes: 1 addition & 1 deletion src/type/definition.js
Expand Up @@ -783,7 +783,7 @@ function defineFieldMap<TSource, TContext>(
const args = objectEntries(argsConfig).map(([argName, arg]) => ({
name: argName,
description: arg.description === undefined ? null : arg.description,
description: arg.description,
type: arg.type,
defaultValue: arg.defaultValue,
extensions: arg.extensions && toObjMap(arg.extensions),
Expand Down
2 changes: 1 addition & 1 deletion src/type/directives.js
Expand Up @@ -83,7 +83,7 @@ export class GraphQLDirective {

this.args = objectEntries(args).map(([argName, arg]) => ({
name: argName,
description: arg.description === undefined ? null : arg.description,
description: arg.description,
type: arg.type,
defaultValue: arg.defaultValue,
extensions: arg.extensions && toObjMap(arg.extensions),
Expand Down

0 comments on commit 4c4df72

Please sign in to comment.