add merge graph pattern