diff --git a/src/bundle/DependencyInjection/GraphQL/YamlSchemaProvider.php b/src/bundle/DependencyInjection/GraphQL/YamlSchemaProvider.php index fc88f4d..5813473 100644 --- a/src/bundle/DependencyInjection/GraphQL/YamlSchemaProvider.php +++ b/src/bundle/DependencyInjection/GraphQL/YamlSchemaProvider.php @@ -15,7 +15,7 @@ class YamlSchemaProvider implements SchemaProvider { public const DXP_SCHEMA_PATH = 'ibexa/'; public const DXP_SCHEMA_FILE = self::DXP_SCHEMA_PATH . 'Domain.types.yaml'; - public const DXP_MUTATION_FILE = self::DXP_SCHEMA_PATH . 'DomainContentMutation.types.yaml'; + public const DXP_MUTATION_FILE = self::DXP_SCHEMA_PATH . 'ItemMutation.types.yaml'; public const APP_QUERY_SCHEMA_FILE = 'Query.types.yaml'; public const APP_MUTATION_SCHEMA_FILE = 'Mutation.types.yaml'; @@ -57,7 +57,7 @@ private function getMutationSchema() if (file_exists($this->getAppMutationSchemaFile())) { return 'Mutation'; } elseif (file_exists($this->getPlatformMutationSchema())) { - return 'DomainContentMutation'; + return 'ItemMutation'; } else { return null; } diff --git a/src/bundle/Resources/config/graphql/PlatformMutation.types.yaml b/src/bundle/Resources/config/graphql/PlatformMutation.types.yaml index 6c51cdf..a9ee319 100644 --- a/src/bundle/Resources/config/graphql/PlatformMutation.types.yaml +++ b/src/bundle/Resources/config/graphql/PlatformMutation.types.yaml @@ -4,7 +4,7 @@ PlatformMutation: fields: deleteContent: type: DeleteContentPayload - resolve: '@=mutation("DeleteDomainContent", [args])' + resolve: '@=mutation("DeleteDomainContent", args)' args: id: type: ID @@ -14,7 +14,7 @@ PlatformMutation: description: "ID of the content item to delete" uploadFiles: type: UploadedFilesPayload - resolve: '@=mutation("UploadFiles", [args])' + resolve: '@=mutation("UploadFiles", args)' args: locationId: type: Int! @@ -26,7 +26,7 @@ PlatformMutation: description: "The language the content items must be created in" createToken: type: CreatedTokenPayload - resolve: '@=mutation("CreateToken", [args])' + resolve: '@=mutation("CreateToken", args)' args: username: type: String! diff --git a/src/lib/Schema/Domain/Content/Worker/ContentType/DefineItemMutation.php b/src/lib/Schema/Domain/Content/Worker/ContentType/DefineItemMutation.php index 779aaeb..12b426c 100644 --- a/src/lib/Schema/Domain/Content/Worker/ContentType/DefineItemMutation.php +++ b/src/lib/Schema/Domain/Content/Worker/ContentType/DefineItemMutation.php @@ -37,7 +37,7 @@ public function work(Builder $schema, array $args) $this->getNameHelper()->itemName($contentType) . '!', [ 'resolve' => sprintf( - '@=mutation("CreateDomainContent", [args["input"], "%s", args["parentLocationId"], args["language"]])', + '@=mutation("CreateDomainContent", args["input"], "%s", args["parentLocationId"], args["language"])', $contentType->identifier ), ] ) @@ -69,7 +69,7 @@ public function work(Builder $schema, array $args) new Builder\Input\Field( $this->getUpdateField($contentType), $this->getNameHelper()->itemName($contentType) . '!', - ['resolve' => '@=mutation("UpdateDomainContent", [args["input"], args, args["versionNo"], args["language"]])'] + ['resolve' => '@=mutation("UpdateDomainContent", args["input"], args, args["versionNo"], args["language"])'] ) );