Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ matrix:
- php: 7.2
env: SYMFONY_VERSION=3.3.*
- php: 7.2
env: SYMFONY_VERSION=3.4.* GRAPHQLPHP_VERSION=0.10.0 DEPENDENCIES=dev
env: SYMFONY_VERSION=3.4.*
- php: 7.2
env: SYMFONY_VERSION=4.0.* TEST_COVERAGE=true
- php: 7.2
Expand Down
1 change: 1 addition & 0 deletions Config/CustomScalarTypeDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public function getDefinition()
$node
->children()
->append($this->nameSection())
->append($this->descriptionSection())
->variableNode('serialize')->isRequired()->end()
->variableNode('parseValue')->isRequired()->end()
->variableNode('parseLiteral')->isRequired()->end()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,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
6 changes: 6 additions & 0 deletions Tests/Functional/Type/CustomScalarTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,10 @@ public function testDateTimeTypeParseValue()
];
$this->assertGraphQL($query, $expected);
}

public function testDateTimeTypeDescription()
{
$dateTimeType = static::$kernel->getContainer()->get('overblog_graphql.type_resolver')->resolve('DateTime');
$this->assertEquals('The DateTime type', $dateTimeType->description);
}
}
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@
"require": {
"php": ">=5.6",
"doctrine/doctrine-cache-bundle": "^1.2",
"overblog/graphql-php-generator": "^0.6.0",
"overblog/graphql-php-generator": "^0.7.0",
"symfony/cache": "^3.1 || ^4.0",
"symfony/config": "^3.1 || ^4.0",
"symfony/dependency-injection": "^3.1 || ^4.0",
"symfony/expression-language": "^3.1 || ^4.0",
"symfony/framework-bundle": "^3.1 || ^4.0",
"symfony/options-resolver": "^3.1 || ^4.0",
"symfony/property-access": "^3.1 || ^4.0",
"webonyx/graphql-php": "^0.10.0 || ^0.11.0"
"webonyx/graphql-php": "^0.11.2"
},
"suggest": {
"nelmio/cors-bundle": "For more flexibility when using CORS prefight",
Expand Down