Obj.to_mesh changes (apply_modifiers)

Previously in 2.79, i was able to create a mesh with all shapekeys applied using the line:
mesh = object.to_mesh(bpy.context.scene, apply_modifiers = True, settings = ‘PREVIEW’)

This allowed me to the vertex positions of a mesh with shape keys applied. Currently, in 2.8, this method takes in these parameters instead:
to_mesh( preserve_all_data_layers=False , depsgraph=None)

is there another way to apply shape keys to a mesh?