Who was the first magic realist writer?

Franz Kafka, born in Prague in 1883, is usually stated to be the literary genre founder of magic realism. The first book which may come under the genre of magical realism, though it was written in 1915, before the term came into use, was Die Verwandlung, also know as The Metamorphisis.