Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

IBX-869: Fixed loading of mutations schema #27

Merged
merged 3 commits into from
Nov 26, 2022
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
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