示例#1
0
def _send_gql_request(gateway_port):
    """send request to gateway and see what happens"""
    mutation = (
        f'mutation {{'
        + '''docs(data: {text: "abcd"}) { 
                    id 
                } 
            }
    '''
    )
    c = Client(host='localhost', port=gateway_port, protocol='http')
    return c.mutate(mutation=mutation)
示例#2
0
def graphql_query(mutation, use_nogql_flow=False):
    p = PORT_EXPOSE_NO_GRAPHQL if use_nogql_flow else PORT_EXPOSE
    c = Client(port=p, protocol='HTTP')
    return c.mutate(mutation=mutation)