Alan Boshier
03/04/2022, 5:49 PMGraphQLInteraction
with PactV3? I'm struggling with how to use it in the following approach as I'm not sure PactV3 has an addInteraction()
method:
const provider = new PactV3(...);
describe('query', () => {
beforeEach(() => {
const graphqlQuery = new GraphQLInteraction()
.uponReceiving('a query')
.withQuery('...')
.withVariables({})
.withRequest({
path: '/graphql',
method: 'POST',
})
.willRespondWith({
status: 200,
headers: { ... },
body: { ... }
});
return provider.addInteraction(graphqlQuery); <-- IS THIS VALID?
)};
)};
Matt (pactflow.io / pact-js / pact-go)
Alan Boshier
03/05/2022, 12:03 AMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Alan Boshier
03/05/2022, 7:01 AMAlan Boshier
03/05/2022, 9:39 AMMatt (pactflow.io / pact-js / pact-go)