Skip to content

Commit

Permalink
IBX-869: Fixed loading of mutations schema (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdunogier authored Nov 26, 2022
1 parent 9bf2e18 commit 647bdbf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/bundle/DependencyInjection/GraphQL/YamlSchemaProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ PlatformMutation:
fields:
deleteContent:
type: DeleteContentPayload
resolve: '@=mutation("DeleteDomainContent", [args])'
resolve: '@=mutation("DeleteDomainContent", args)'
args:
id:
type: ID
Expand All @@ -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!
Expand All @@ -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!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
), ]
)
Expand Down Expand Up @@ -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"])']
)
);

Expand Down

0 comments on commit 647bdbf

Please sign in to comment.