function parseArrayToSet(payload: any, relationField: Array<string>, jsonPath: Array<string>, path: string): any {
  if (jsonPath.indexOf(path) >= 0) {
    return payload;
  }

  if (isArray(payload) && relationField.indexOf(path) === -1) {
    return {
      set: payload.map(v => parseArrayToSet(v, relationField, jsonPath, path))
    };
  } else if (isPlainObject(payload)) {
    return mapValues(payload, (v, k) => parseArrayToSet(v, relationField, jsonPath, path ? `${path}/${k}` : k));
  } else {
    return payload
  }
}
In canner graphql interface,
an array value should become a object with `set` keyword.

for examples:
origin payload = {
  hobbies: ['basketball', 'swim'] 
  name: 'James'
}
will become
{
  hobbies: {
    set: ['basketball', 'swim']
  },
  name: 'James'
}