code: function patchInObject (collection, payload, key) {
    invariant(
      !isNil(key),
      `You are trying to update a resource but haven't specified the identifier. Try again with "clerk.put('${
        collection
      }', payload, identifier)"`
    )
  
    if (isNil(this[collection][key])) return
  
    const updatedResource = merge(this[collection][key], removeUndefined(payload))
  
    this[collection] = {
      ...(this[collection] || {}),
      [key]: updatedResource,
    }
    return updatedResource
  }
docs: PATCH