diff --git a/composer.json b/composer.json index 400bd21d..bec1b242 100755 --- a/composer.json +++ b/composer.json @@ -31,7 +31,10 @@ }, "autoload": { "psr-4": { - "SilverStripe\\Versioned\\": ["src/", "_legacy/"], + "SilverStripe\\Versioned\\": [ + "src/", + "_legacy/" + ], "SilverStripe\\Versioned\\Tests\\": "tests/php/" } }, @@ -41,4 +44,4 @@ }, "minimum-stability": "dev", "prefer-stable": true -} +} \ No newline at end of file diff --git a/src/GraphQL/Resolvers/VersionedResolver.php b/src/GraphQL/Resolvers/VersionedResolver.php index 30152e57..e434efd7 100644 --- a/src/GraphQL/Resolvers/VersionedResolver.php +++ b/src/GraphQL/Resolvers/VersionedResolver.php @@ -43,7 +43,7 @@ public static function resolveVersionFields(DataObject $obj, array $args, array case 'publisher': return $obj->Publisher(); case 'published': - return $obj->isPublished(); + return $obj->WasPublished; case 'draft': return $obj->WasDraft; case 'deleted':