Skip to content

Conversation

@MartkCz
Copy link
Contributor

@MartkCz MartkCz commented Apr 3, 2020

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
License MIT
resources:
    App\Entity\Account:
        graphql:
            custom:
                mutation: App\Mutation\Account\CustomMutation
                description: Custom description

Before commit: Customs a Account
After commit: Custom description

$shortName = $resourceMetadata->getShortName();
$resourceType = new Type(Type::BUILTIN_TYPE_OBJECT, true, $resourceClass);
$deprecationReason = $resourceMetadata->getGraphqlAttribute($mutationName, 'deprecation_reason', '', true);
$description = $resourceMetadata->getGraphqlAttribute($mutationName, 'description', ucfirst("{$mutationName}s a $shortName."), false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add it before $deprecationReason?

Copy link
Member

@alanpoulain alanpoulain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you change it for the subscriptions too?

@alanpoulain
Copy link
Member

Maybe a test would be nice 🙂

@alanpoulain alanpoulain merged commit 8fde8f1 into api-platform:master Apr 22, 2020
@alanpoulain
Copy link
Member

Thank you @MartkCz.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants