Recipe for adding a GraphQL mutation that hits an existing service contract?

Goal: expose VendorRepositoryInterface::save as a createVendor(input: VendorInput!): Vendor mutation. Files: etc/schema.graphqls (input type, payload type, mutation), Model/Resolver/CreateVendor.php (implements ResolverInterface, calls the repository, maps VendorInterface to the GraphQL output array). Auth: add @doc on the mutation and gate via the resolver checking $context->getExtensionAttributes()->getIsCustomer() for storefront-only. Verify: bin/magento cache:clean config graphql_query_resolver_cache, then run the mutation in a GraphQL IDE with a customer token. The resolver should be < 30 lines, if it's longer, business logic leaked out of the repository.

Kishan Savaliya
Kishan Savaliya
Adobe Certified Magento Commerce Developer
Ahmedabad [IN]working hours, replies within four hours
When do you need it

Read personally. Never shared. Or email the brief.

More on claude, recipes cookbook

Need it fixed, not just explained?

Send the brief with your store URL; the written quote comes back within 24 hours.