How can i update parent node while inserting new child node?

This should be

 p = {
                'Person.name' : 'John',
                'Person.house' : [{'uid' : '0x1'}]
            }

In Dgraph the relations are UID based, not value based.

Also, you are building your Schema using GraphQL Schema. DQL and GQL Schemas are completly different topics. You should not rely on a GQL schema and work with DQL. There are different features and approaches there.

If you still wanna sitck to GraphQL Schema, there are several points to take into consideration before continuing.