Visiting graveyards and praying for the dead is permissible but not to the dead. There are no verses in Quran which says visiting Dargah (shrines) is shirk. In fact visiting graves is the SUNNAH of our Prophet (sallal lahu alaihi wasallam).
Is visiting graves allowed in Islam?
Muslims are permitted to visit the grave and cemetery of non-Muslims for a time of reflection and remembrance, and to show honor for the deceased and the relationship shared. Muslims should not, however, participate in any funeral ritual or custom of a non-believer.
Is it okay to pray at Dargah?
Devotees can pray & wish for something they want -- could be for themselves or others. ... Pray with all your honesty & once your wishes are fulfilled, you need to re-visit Dargah & untie the thread(Well, there are many threads & you'll never know which one is yours -- so you can untie any thread).