graphql-engine/server/tests-py/remote_server.py
Karthikeyan Chinnakonda d6de3592ed
actions: fix behaviour when using remote relationship in mutation action's relationship (#4982)
* resolve the remote server when a remote join query used in action mutation
2020-06-05 17:33:18 +05:30

21 lines
555 B
Python

#!/usr/bin/env python3
import subprocess
import time
class NodeGraphQL():
def __init__(self, cmd):
self.cmd = cmd
self.proc = None
def start(self):
proc = subprocess.Popen(self.cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
time.sleep(1)
proc.poll()
if proc.returncode is not None:
raise Exception("It seems our node graphql test server stopped unexpectedly:\n" + proc.stdout.read().decode('utf-8'))
self.proc = proc
def stop(self):
self.proc.terminate()