Added a description field to schema type definition classes

This commit is contained in:
jane-olszewska 2017-02-03 13:03:29 +00:00
parent bbb5cf1e4d
commit dd31ab2b80
10 changed files with 83 additions and 19 deletions

View File

@ -22,4 +22,9 @@ class EnumTypeDefinitionNode extends Node implements TypeDefinitionNode
* @var EnumValueDefinitionNode[] * @var EnumValueDefinitionNode[]
*/ */
public $values; public $values;
/**
* @var string
*/
public $description;
} }

View File

@ -17,4 +17,9 @@ class EnumValueDefinitionNode extends Node
* @var DirectiveNode[] * @var DirectiveNode[]
*/ */
public $directives; public $directives;
/**
* @var string
*/
public $description;
} }

View File

@ -27,4 +27,9 @@ class FieldDefinitionNode extends Node
* @var DirectiveNode[] * @var DirectiveNode[]
*/ */
public $directives; public $directives;
/**
* @var string
*/
public $description;
} }

View File

@ -22,4 +22,9 @@ class InputObjectTypeDefinitionNode extends Node implements TypeDefinitionNode
* @var InputValueDefinitionNode[] * @var InputValueDefinitionNode[]
*/ */
public $fields; public $fields;
/**
* @var string
*/
public $description;
} }

View File

@ -27,4 +27,9 @@ class InputValueDefinitionNode extends Node
* @var DirectiveNode[] * @var DirectiveNode[]
*/ */
public $directives; public $directives;
/**
* @var string
*/
public $description;
} }

View File

@ -22,4 +22,9 @@ class InterfaceTypeDefinitionNode extends Node implements TypeDefinitionNode
* @var FieldDefinitionNode[] * @var FieldDefinitionNode[]
*/ */
public $fields = []; public $fields = [];
/**
* @var string
*/
public $description;
} }

View File

@ -27,4 +27,9 @@ class ObjectTypeDefinitionNode extends Node implements TypeDefinitionNode
* @var FieldDefinitionNode[] * @var FieldDefinitionNode[]
*/ */
public $fields; public $fields;
/**
* @var string
*/
public $description;
} }

View File

@ -17,4 +17,9 @@ class ScalarTypeDefinitionNode extends Node implements TypeDefinitionNode
* @var DirectiveNode[] * @var DirectiveNode[]
*/ */
public $directives; public $directives;
/**
* @var string
*/
public $description;
} }

View File

@ -22,4 +22,9 @@ class UnionTypeDefinitionNode extends Node implements TypeDefinitionNode
* @var NamedTypeNode[] * @var NamedTypeNode[]
*/ */
public $types = []; public $types = [];
/**
* @var string
*/
public $description;
} }

View File

@ -54,7 +54,8 @@ type Hello {
$loc(16, 29) $loc(16, 29)
) )
], ],
'loc' => $loc(1, 31) 'loc' => $loc(1, 31),
'description' => null
] ]
], ],
'loc' => $loc(0, 31) 'loc' => $loc(0, 31)
@ -93,7 +94,8 @@ extend type Hello {
$loc(23, 36) $loc(23, 36)
) )
], ],
'loc' => $loc(8, 38) 'loc' => $loc(8, 38),
'description' => null
], ],
'loc' => $loc(1, 38) 'loc' => $loc(1, 38)
] ]
@ -136,7 +138,8 @@ type Hello {
$loc(16,30) $loc(16,30)
) )
], ],
'loc' => $loc(1,32) 'loc' => $loc(1,32),
'description' => null
] ]
], ],
'loc' => $loc(0,32) 'loc' => $loc(0,32)
@ -165,7 +168,8 @@ type Hello {
], ],
'directives' => [], 'directives' => [],
'fields' => [], 'fields' => [],
'loc' => $loc(0,31) 'loc' => $loc(0,31),
'description' => null
] ]
], ],
'loc' => $loc(0,31) 'loc' => $loc(0,31)
@ -195,7 +199,8 @@ type Hello {
], ],
'directives' => [], 'directives' => [],
'fields' => [], 'fields' => [],
'loc' => $loc(0, 33) 'loc' => $loc(0, 33),
'description' => null
] ]
], ],
'loc' => $loc(0, 33) 'loc' => $loc(0, 33)
@ -221,7 +226,8 @@ type Hello {
'name' => $this->nameNode('Hello', $loc(5, 10)), 'name' => $this->nameNode('Hello', $loc(5, 10)),
'directives' => [], 'directives' => [],
'values' => [$this->enumValueNode('WORLD', $loc(13, 18))], 'values' => [$this->enumValueNode('WORLD', $loc(13, 18))],
'loc' => $loc(0, 20) 'loc' => $loc(0, 20),
'description' => null
] ]
], ],
'loc' => $loc(0, 20) 'loc' => $loc(0, 20)
@ -250,7 +256,8 @@ type Hello {
$this->enumValueNode('WO', $loc(13, 15)), $this->enumValueNode('WO', $loc(13, 15)),
$this->enumValueNode('RLD', $loc(17, 20)) $this->enumValueNode('RLD', $loc(17, 20))
], ],
'loc' => $loc(0, 22) 'loc' => $loc(0, 22),
'description' => null
] ]
], ],
'loc' => $loc(0, 22) 'loc' => $loc(0, 22)
@ -285,7 +292,8 @@ interface Hello {
$loc(21, 34) $loc(21, 34)
) )
], ],
'loc' => $loc(1, 36) 'loc' => $loc(1, 36),
'description' => null
] ]
], ],
'loc' => $loc(0,36) 'loc' => $loc(0,36)
@ -328,7 +336,8 @@ type Hello {
$loc(16, 44) $loc(16, 44)
) )
], ],
'loc' => $loc(1, 46) 'loc' => $loc(1, 46),
'description' => null
] ]
], ],
'loc' => $loc(0, 46) 'loc' => $loc(0, 46)
@ -372,7 +381,8 @@ type Hello {
$loc(16, 51) $loc(16, 51)
) )
], ],
'loc' => $loc(1, 53) 'loc' => $loc(1, 53),
'description' => null
] ]
], ],
'loc' => $loc(0, 53) 'loc' => $loc(0, 53)
@ -415,7 +425,8 @@ type Hello {
$loc(16, 47) $loc(16, 47)
) )
], ],
'loc' => $loc(1, 49) 'loc' => $loc(1, 49),
'description' => null
] ]
], ],
'loc' => $loc(0, 49) 'loc' => $loc(0, 49)
@ -465,7 +476,8 @@ type Hello {
$loc(16, 59) $loc(16, 59)
) )
], ],
'loc' => $loc(1, 61) 'loc' => $loc(1, 61),
'description' => null
] ]
], ],
'loc' => $loc(0, 61) 'loc' => $loc(0, 61)
@ -490,7 +502,8 @@ type Hello {
'name' => $this->nameNode('Hello', $loc(6, 11)), 'name' => $this->nameNode('Hello', $loc(6, 11)),
'directives' => [], 'directives' => [],
'types' => [$this->typeNode('World', $loc(14, 19))], 'types' => [$this->typeNode('World', $loc(14, 19))],
'loc' => $loc(0, 19) 'loc' => $loc(0, 19),
'description' => null
] ]
], ],
'loc' => $loc(0, 19) 'loc' => $loc(0, 19)
@ -519,7 +532,8 @@ type Hello {
$this->typeNode('Wo', $loc(14, 16)), $this->typeNode('Wo', $loc(14, 16)),
$this->typeNode('Rld', $loc(19, 22)) $this->typeNode('Rld', $loc(19, 22))
], ],
'loc' => $loc(0, 22) 'loc' => $loc(0, 22),
'description' => null
] ]
], ],
'loc' => $loc(0, 22) 'loc' => $loc(0, 22)
@ -542,7 +556,8 @@ type Hello {
'kind' => NodeKind::SCALAR_TYPE_DEFINITION, 'kind' => NodeKind::SCALAR_TYPE_DEFINITION,
'name' => $this->nameNode('Hello', $loc(7, 12)), 'name' => $this->nameNode('Hello', $loc(7, 12)),
'directives' => [], 'directives' => [],
'loc' => $loc(0, 12) 'loc' => $loc(0, 12),
'description' => null
] ]
], ],
'loc' => $loc(0, 12) 'loc' => $loc(0, 12)
@ -577,7 +592,8 @@ input Hello {
$loc(17, 30) $loc(17, 30)
) )
], ],
'loc' => $loc(1, 32) 'loc' => $loc(1, 32),
'description' => null
] ]
], ],
'loc' => $loc(0, 32) 'loc' => $loc(0, 32)
@ -629,7 +645,8 @@ input Hello {
'arguments' => $args, 'arguments' => $args,
'type' => $type, 'type' => $type,
'directives' => [], 'directives' => [],
'loc' => $loc 'loc' => $loc,
'description' => null
]; ];
} }
@ -639,7 +656,8 @@ input Hello {
'kind' => NodeKind::ENUM_VALUE_DEFINITION, 'kind' => NodeKind::ENUM_VALUE_DEFINITION,
'name' => $this->nameNode($name, $loc), 'name' => $this->nameNode($name, $loc),
'directives' => [], 'directives' => [],
'loc' => $loc 'loc' => $loc,
'description' => null
]; ];
} }
@ -651,7 +669,8 @@ input Hello {
'type' => $type, 'type' => $type,
'defaultValue' => $defaultValue, 'defaultValue' => $defaultValue,
'directives' => [], 'directives' => [],
'loc' => $loc 'loc' => $loc,
'description' => null
]; ];
} }
} }