def delete(): print("delete ---------------------------------------------------------") result = mySchema.execute(''' mutation { DeleteUserMutaton(personData: {id:3, name:{fn:"Hong", ln:"Sun" } }) { person { id } } } ''') printResult(result)
def queryAll(): print("queryAll ---------------------------------------------------------") result = mySchema.execute(''' { users { name { fn ln } } } ''') printResult(result)
def create(): print("create ---------------------------------------------------------") result = mySchema.execute(''' mutation { CreateUserMutation(personData: {id: 3, name: { fn: "Lucas", ln: "Zhang" } }) { person { id name { fn ln } } } } ''') printResult(result)
def update(): print("update ---------------------------------------------------------") result = mySchema.execute(''' mutation { UpdateUserMutaton(personData: {id:3, name:{fn:"Hong", ln:"Sun" } }) { person { id name { fn ln } } } } ''') printResult(result)
def create(): print("create ---------------------------------------------------------") result = mySchema.execute( ''' mutation { CreateUserMutation(personData: {id: 3, fn:"Bob", ln:"Zhang"}) { person { id fn ln } } } ''' ) printResult(result)