console/integration-tests/testkit/external-composition.ts
Saihajpreet Singh 642daaf494
Use Envelop v3 and GraphQL Yoga v3 (#443)
Co-authored-by: Arda TANRIKULU <ardatanrikulu@gmail.com>
Co-authored-by: Kamil Kisiela <kamil.kisiela@gmail.com>
2022-10-06 13:48:01 +02:00

19 lines
536 B
TypeScript

import * as utils from 'dockest/test-helper';
import { fetch } from '@whatwg-node/fetch';
const port = 3012;
export const container = 'external_composition';
export const address = utils.getServiceAddress(container, port);
export const dockerAddress = `${container}:${port}`;
export async function history(): Promise<string[]> {
const res = await fetch(`http://${address}/_history`, {
method: 'GET',
headers: {
accept: 'application/json',
'content-type': 'application/json',
},
});
return res.json();
}