Closed Trellian closed 6 years ago
I'm going to go ahead and close this, as there are conflicts. Also, I'm not sure how I feel about introducing a CRUD-specific API to a GraphQL interface as one of the motivations of GraphQL was to get away from CRUD-centric mutations.
I've added really basic Mutation support -
The following operations are available:
An example mutation:
The selector fields which select which record(s) are to be updated must use the extra field operation syntax in the parameters for the mutation.
eg:
idEq: $Id
from the example above.Other plain parameters are the fields that will be used to update the record fields.
eg:
country_id: $CountryId
andname: $Name
from the example above.The only result returned at this point is the number of rows affected. An extra query is required to return the updated recordset.
Damn, I also just realised that I also added the
pluralizer
package in the same PR. This fixes my schema so that for eg.Country
gets pluralized asCountries
, not asCountrys