Mushroom, Spinach Sweet Potato Patties

• 1 sweet potato, peeled
• 2 flat mushrooms, de-stemmed, scraped and chopped
• 4 button mushrooms, de-stemmed and chopped
• 2 garlic cloves, finely sliced
• ½ cup vegetable stock
• 3 cups spinach, washed and chopped
• 1 red onion, chopped
• black pepper
• ½ tablespoon thyme
• 1 teaspoon paprika
• ¾ cup buckwheat flour or wholemeal flour