Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add description field to custom-scalar type #20

Merged
merged 3 commits into from
Dec 13, 2017
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Resources/skeleton/CustomScalarConfig.php.skeleton
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[
<spaces>'name' => <name>,
<spaces>'description' => <description>,
<spaces>'serialize' => <serialize>,
<spaces>'parseValue' => <parseValue>,
<spaces>'parseLiteral' => <parseLiteral>,
Expand Down
1 change: 1 addition & 0 deletions tests/StarWarsQueryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -365,5 +365,6 @@ public function testDateTime()
'dateTime' => '2016-01-18 23:00:00',
];
$this->assertValidQuery($query, $expected);
$this->assertEquals('The DateTime type', $this->getType('DateTime')->description);
}
}
1 change: 1 addition & 0 deletions tests/starWarsSchema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
DateTime:
type: custom-scalar
config:
description: "The DateTime type"
serialize: ["Overblog\\GraphQLGenerator\\Tests\\DateTimeType", "serialize"]
parseValue: ["Overblog\\GraphQLGenerator\\Tests\\DateTimeType", "parseValue"]
parseLiteral: ["Overblog\\GraphQLGenerator\\Tests\\DateTimeType", "parseLiteral"]
Expand Down