php-graphql-client icon indicating copy to clipboard operation
php-graphql-client copied to clipboard

Update Mutation

Open acamenhas opened this issue 2 years ago • 1 comments

Hello,

I didnt see any example or test for a update mutation, how can be implemented this mutation:

mutation MyMutation { update_users(where: {id: {_eq: 1}}, _set: {name: "My name"}) { affected_rows } }

Thank you

acamenhas avatar May 06 '22 09:05 acamenhas

I guess you just need to nest queries like:

->setSelectionSet( [ (new Query('collection')) ->setSelectionSet( [ 'id', 'title', 'descriptionHtml', 'handle', 'sortOrder', ] ) ], );

VadimNowo avatar Jul 02 '22 16:07 VadimNowo