As a technical legal matter, when a claimant files suit to foreclose on a Mechanics' Lien, that claimant is supposed to name (as parties to the lawsuit) all other lien claimants. Mechanics' Liens on one project all attach at the same time, and all are given equal dignity, so the lien from the grader and the lien from the painter are equal in the eyes of the law, even though the grader did her work well before the painter did his.
If you have a direct contract with the owner of the property, and there is not any good faith dispute about the amount owed, then the owner could be subject to a penalty of 2% per month on the amount wrongfully withheld, and the owner could be liable for your attorneys' fees and costs incurred in the lawsuit. (Civil Code 8800).
You may have a variety of remedies for non-payment or you may have no remedies, but until you sit down with an experienced construction attorney and explain the entire situation, you may not know which situation you are in.
Construction projects and the legal rights and remedies that flow from them are legally technical and factually intensive. This Avvo answer is not legal advice and should not be relied upon without further consultation with a qualified construction lawyer.
Yes, I agree that it is possible for all of the lien claimants to band together and collectively sue to foreclose. There are conflict waivers of interest that everyone needs to sign. It can be troublesome, however, if it turns out there are problems with the work of 1 or more of the other contractors. All of the lien claimants would be named as parties in the action so no one would be able to foreclose first.