mirror of
https://github.com/retailcrm/graphql-php.git
synced 2025-02-06 15:59:24 +03:00
Merge pull request #88 from jane-olszewska/schema-description-in-comments
Schema Definition Language: element descriptions can be set through comments
This commit is contained in:
commit
c2f0749d8e
@ -22,4 +22,9 @@ class EnumTypeDefinitionNode extends Node implements TypeDefinitionNode
|
|||||||
* @var EnumValueDefinitionNode[]
|
* @var EnumValueDefinitionNode[]
|
||||||
*/
|
*/
|
||||||
public $values;
|
public $values;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $description;
|
||||||
}
|
}
|
||||||
|
@ -17,4 +17,9 @@ class EnumValueDefinitionNode extends Node
|
|||||||
* @var DirectiveNode[]
|
* @var DirectiveNode[]
|
||||||
*/
|
*/
|
||||||
public $directives;
|
public $directives;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $description;
|
||||||
}
|
}
|
||||||
|
@ -27,4 +27,9 @@ class FieldDefinitionNode extends Node
|
|||||||
* @var DirectiveNode[]
|
* @var DirectiveNode[]
|
||||||
*/
|
*/
|
||||||
public $directives;
|
public $directives;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $description;
|
||||||
}
|
}
|
||||||
|
@ -22,4 +22,9 @@ class InputObjectTypeDefinitionNode extends Node implements TypeDefinitionNode
|
|||||||
* @var InputValueDefinitionNode[]
|
* @var InputValueDefinitionNode[]
|
||||||
*/
|
*/
|
||||||
public $fields;
|
public $fields;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $description;
|
||||||
}
|
}
|
||||||
|
@ -27,4 +27,9 @@ class InputValueDefinitionNode extends Node
|
|||||||
* @var DirectiveNode[]
|
* @var DirectiveNode[]
|
||||||
*/
|
*/
|
||||||
public $directives;
|
public $directives;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $description;
|
||||||
}
|
}
|
||||||
|
@ -22,4 +22,9 @@ class InterfaceTypeDefinitionNode extends Node implements TypeDefinitionNode
|
|||||||
* @var FieldDefinitionNode[]
|
* @var FieldDefinitionNode[]
|
||||||
*/
|
*/
|
||||||
public $fields = [];
|
public $fields = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $description;
|
||||||
}
|
}
|
||||||
|
@ -27,4 +27,9 @@ class ObjectTypeDefinitionNode extends Node implements TypeDefinitionNode
|
|||||||
* @var FieldDefinitionNode[]
|
* @var FieldDefinitionNode[]
|
||||||
*/
|
*/
|
||||||
public $fields;
|
public $fields;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $description;
|
||||||
}
|
}
|
||||||
|
@ -17,4 +17,9 @@ class ScalarTypeDefinitionNode extends Node implements TypeDefinitionNode
|
|||||||
* @var DirectiveNode[]
|
* @var DirectiveNode[]
|
||||||
*/
|
*/
|
||||||
public $directives;
|
public $directives;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $description;
|
||||||
}
|
}
|
||||||
|
@ -22,4 +22,9 @@ class UnionTypeDefinitionNode extends Node implements TypeDefinitionNode
|
|||||||
* @var NamedTypeNode[]
|
* @var NamedTypeNode[]
|
||||||
*/
|
*/
|
||||||
public $types = [];
|
public $types = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $description;
|
||||||
}
|
}
|
||||||
|
@ -492,7 +492,7 @@ class Lexer
|
|||||||
$line,
|
$line,
|
||||||
$col,
|
$col,
|
||||||
$prev,
|
$prev,
|
||||||
mb_substr($body, $start + 1, $position - $start + 1, 'UTF-8')
|
mb_substr($body, $start + 1, $position - $start, 'UTF-8')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -910,10 +910,13 @@ class Parser
|
|||||||
$name = $this->parseName();
|
$name = $this->parseName();
|
||||||
$directives = $this->parseDirectives();
|
$directives = $this->parseDirectives();
|
||||||
|
|
||||||
|
$description = $this->getDescriptionFromAdjacentCommentTokens($start);
|
||||||
|
|
||||||
return new ScalarTypeDefinitionNode([
|
return new ScalarTypeDefinitionNode([
|
||||||
'name' => $name,
|
'name' => $name,
|
||||||
'directives' => $directives,
|
'directives' => $directives,
|
||||||
'loc' => $this->loc($start)
|
'loc' => $this->loc($start),
|
||||||
|
'description' => $description
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -935,12 +938,15 @@ class Parser
|
|||||||
Token::BRACE_R
|
Token::BRACE_R
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$description = $this->getDescriptionFromAdjacentCommentTokens($start);
|
||||||
|
|
||||||
return new ObjectTypeDefinitionNode([
|
return new ObjectTypeDefinitionNode([
|
||||||
'name' => $name,
|
'name' => $name,
|
||||||
'interfaces' => $interfaces,
|
'interfaces' => $interfaces,
|
||||||
'directives' => $directives,
|
'directives' => $directives,
|
||||||
'fields' => $fields,
|
'fields' => $fields,
|
||||||
'loc' => $this->loc($start)
|
'loc' => $this->loc($start),
|
||||||
|
'description' => $description
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -972,12 +978,15 @@ class Parser
|
|||||||
$type = $this->parseTypeReference();
|
$type = $this->parseTypeReference();
|
||||||
$directives = $this->parseDirectives();
|
$directives = $this->parseDirectives();
|
||||||
|
|
||||||
|
$description = $this->getDescriptionFromAdjacentCommentTokens($start);
|
||||||
|
|
||||||
return new FieldDefinitionNode([
|
return new FieldDefinitionNode([
|
||||||
'name' => $name,
|
'name' => $name,
|
||||||
'arguments' => $args,
|
'arguments' => $args,
|
||||||
'type' => $type,
|
'type' => $type,
|
||||||
'directives' => $directives,
|
'directives' => $directives,
|
||||||
'loc' => $this->loc($start)
|
'loc' => $this->loc($start),
|
||||||
|
'description' => $description
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1007,12 +1016,14 @@ class Parser
|
|||||||
$defaultValue = $this->parseConstValue();
|
$defaultValue = $this->parseConstValue();
|
||||||
}
|
}
|
||||||
$directives = $this->parseDirectives();
|
$directives = $this->parseDirectives();
|
||||||
|
$description = $this->getDescriptionFromAdjacentCommentTokens($start);
|
||||||
return new InputValueDefinitionNode([
|
return new InputValueDefinitionNode([
|
||||||
'name' => $name,
|
'name' => $name,
|
||||||
'type' => $type,
|
'type' => $type,
|
||||||
'defaultValue' => $defaultValue,
|
'defaultValue' => $defaultValue,
|
||||||
'directives' => $directives,
|
'directives' => $directives,
|
||||||
'loc' => $this->loc($start)
|
'loc' => $this->loc($start),
|
||||||
|
'description' => $description
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1032,11 +1043,14 @@ class Parser
|
|||||||
Token::BRACE_R
|
Token::BRACE_R
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$description = $this->getDescriptionFromAdjacentCommentTokens($start);
|
||||||
|
|
||||||
return new InterfaceTypeDefinitionNode([
|
return new InterfaceTypeDefinitionNode([
|
||||||
'name' => $name,
|
'name' => $name,
|
||||||
'directives' => $directives,
|
'directives' => $directives,
|
||||||
'fields' => $fields,
|
'fields' => $fields,
|
||||||
'loc' => $this->loc($start)
|
'loc' => $this->loc($start),
|
||||||
|
'description' => $description
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1053,11 +1067,14 @@ class Parser
|
|||||||
$this->expect(Token::EQUALS);
|
$this->expect(Token::EQUALS);
|
||||||
$types = $this->parseUnionMembers();
|
$types = $this->parseUnionMembers();
|
||||||
|
|
||||||
|
$description = $this->getDescriptionFromAdjacentCommentTokens($start);
|
||||||
|
|
||||||
return new UnionTypeDefinitionNode([
|
return new UnionTypeDefinitionNode([
|
||||||
'name' => $name,
|
'name' => $name,
|
||||||
'directives' => $directives,
|
'directives' => $directives,
|
||||||
'types' => $types,
|
'types' => $types,
|
||||||
'loc' => $this->loc($start)
|
'loc' => $this->loc($start),
|
||||||
|
'description' => $description
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1093,11 +1110,14 @@ class Parser
|
|||||||
Token::BRACE_R
|
Token::BRACE_R
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$description = $this->getDescriptionFromAdjacentCommentTokens($start);
|
||||||
|
|
||||||
return new EnumTypeDefinitionNode([
|
return new EnumTypeDefinitionNode([
|
||||||
'name' => $name,
|
'name' => $name,
|
||||||
'directives' => $directives,
|
'directives' => $directives,
|
||||||
'values' => $values,
|
'values' => $values,
|
||||||
'loc' => $this->loc($start)
|
'loc' => $this->loc($start),
|
||||||
|
'description' => $description
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1110,10 +1130,13 @@ class Parser
|
|||||||
$name = $this->parseName();
|
$name = $this->parseName();
|
||||||
$directives = $this->parseDirectives();
|
$directives = $this->parseDirectives();
|
||||||
|
|
||||||
|
$description = $this->getDescriptionFromAdjacentCommentTokens($start);
|
||||||
|
|
||||||
return new EnumValueDefinitionNode([
|
return new EnumValueDefinitionNode([
|
||||||
'name' => $name,
|
'name' => $name,
|
||||||
'directives' => $directives,
|
'directives' => $directives,
|
||||||
'loc' => $this->loc($start)
|
'loc' => $this->loc($start),
|
||||||
|
'description' => $description
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1133,11 +1156,14 @@ class Parser
|
|||||||
Token::BRACE_R
|
Token::BRACE_R
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$description = $this->getDescriptionFromAdjacentCommentTokens($start);
|
||||||
|
|
||||||
return new InputObjectTypeDefinitionNode([
|
return new InputObjectTypeDefinitionNode([
|
||||||
'name' => $name,
|
'name' => $name,
|
||||||
'directives' => $directives,
|
'directives' => $directives,
|
||||||
'fields' => $fields,
|
'fields' => $fields,
|
||||||
'loc' => $this->loc($start)
|
'loc' => $this->loc($start),
|
||||||
|
'description' => $description
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1193,4 +1219,28 @@ class Parser
|
|||||||
} while ($this->skip(Token::PIPE));
|
} while ($this->skip(Token::PIPE));
|
||||||
return $locations;
|
return $locations;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Token $nameToken
|
||||||
|
* @return null|string
|
||||||
|
*/
|
||||||
|
private function getDescriptionFromAdjacentCommentTokens(Token $nameToken)
|
||||||
|
{
|
||||||
|
$description = null;
|
||||||
|
|
||||||
|
$currentToken = $nameToken;
|
||||||
|
$previousToken = $currentToken->prev;
|
||||||
|
|
||||||
|
while ($previousToken->kind == Token::COMMENT
|
||||||
|
&& ($previousToken->line + 1) == $currentToken->line
|
||||||
|
) {
|
||||||
|
$description = $previousToken->value . $description;
|
||||||
|
|
||||||
|
// walk the tokens backwards until no longer adjacent comments
|
||||||
|
$currentToken = $previousToken;
|
||||||
|
$previousToken = $currentToken->prev;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $description;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -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)
|
||||||
@ -598,6 +614,47 @@ input Hello {
|
|||||||
Parser::parse($body);
|
Parser::parse($body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @it Simple type
|
||||||
|
*/
|
||||||
|
public function testSimpleTypeDescriptionInComments()
|
||||||
|
{
|
||||||
|
$body = '
|
||||||
|
# This is a simple type description.
|
||||||
|
# It is multiline *and includes formatting*.
|
||||||
|
type Hello {
|
||||||
|
# And this is a field description
|
||||||
|
world: String
|
||||||
|
}';
|
||||||
|
$doc = Parser::parse($body);
|
||||||
|
$loc = function($start, $end) {return TestUtils::locArray($start, $end);};
|
||||||
|
|
||||||
|
$fieldNode = $this->fieldNode(
|
||||||
|
$this->nameNode('world', $loc(134, 139)),
|
||||||
|
$this->typeNode('String', $loc(141, 147)),
|
||||||
|
$loc(134, 147)
|
||||||
|
);
|
||||||
|
$fieldNode['description'] = " And this is a field description\n";
|
||||||
|
$expected = [
|
||||||
|
'kind' => NodeKind::DOCUMENT,
|
||||||
|
'definitions' => [
|
||||||
|
[
|
||||||
|
'kind' => NodeKind::OBJECT_TYPE_DEFINITION,
|
||||||
|
'name' => $this->nameNode('Hello', $loc(88, 93)),
|
||||||
|
'interfaces' => [],
|
||||||
|
'directives' => [],
|
||||||
|
'fields' => [
|
||||||
|
$fieldNode
|
||||||
|
],
|
||||||
|
'loc' => $loc(83, 149),
|
||||||
|
'description' => " This is a simple type description.\n It is multiline *and includes formatting*.\n"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
'loc' => $loc(0, 149)
|
||||||
|
];
|
||||||
|
$this->assertEquals($expected, TestUtils::nodeToArray($doc));
|
||||||
|
}
|
||||||
|
|
||||||
private function typeNode($name, $loc)
|
private function typeNode($name, $loc)
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
@ -629,7 +686,8 @@ input Hello {
|
|||||||
'arguments' => $args,
|
'arguments' => $args,
|
||||||
'type' => $type,
|
'type' => $type,
|
||||||
'directives' => [],
|
'directives' => [],
|
||||||
'loc' => $loc
|
'loc' => $loc,
|
||||||
|
'description' => null
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -639,7 +697,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 +710,8 @@ input Hello {
|
|||||||
'type' => $type,
|
'type' => $type,
|
||||||
'defaultValue' => $defaultValue,
|
'defaultValue' => $defaultValue,
|
||||||
'directives' => [],
|
'directives' => [],
|
||||||
'loc' => $loc
|
'loc' => $loc,
|
||||||
|
'description' => null
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user