from time import sleep from appsync_query import appsync_query_iam from id_test_devel import API_URL, pool_region QUERY_send_collection = """mutation updateCollection($channelId:ID!, $collectionId: ID!, $collection:CollectionInput!) { sendCollection(channelId:$channelId, collectionId:$collectionId, collection:$collection) { channelId collectionId collection { id status } } }""" QUERY_send_alliance = """mutation updateAlliance($channelId:ID!, $alliance:AllianceInput!) { sendAlliance(channelId:$channelId, alliance:$alliance) { channelId alliance { id status } } }""" test_variables = {"channelId": "ccfe357f928adcf08dc55a4ef28bc52d1e77878372e43a4358c689c8b", "alliance":{ "id":"ccfe357f928adcf08dc55a4ef28bc52d1e77878372e43a4358c689c8b", "status": "finished" } } send_variables = {'channelId': 'a9028389dfd904ce51a2aaad93299463286b9ae90c3ee12ec16ea8d3cd37d99e', 'collectionId': 1, 'collection': {'id':1, 'status': 'uploaded'} } # slava # send_variables['channelId'] = '19689a1b5e597736edea63876f74d6818b9883d0642ff1e7d54806874b0d76ce' for n in range(1000): #test_variables["status"] = f"ok {n}" #response = appsync_query_iam(API_URL, pool_region, QUERY_send_collection, send_variables) response = appsync_query_iam(API_URL, pool_region, QUERY_send_alliance, test_variables) print(response.content) sleep(10)