Skip to content

Commit 49d72f0

Browse files
committed
feat: add GraphQL support to PactV4
- Refactors the GraphQL common utilities into a single package - Refactors the V4 HTTP package into multiple files (lint)
1 parent 19acb7f commit 49d72f0

37 files changed

+6341
-428
lines changed

examples/v4/graphql/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
src/*.js
2+
src/*.d.ts

examples/v4/graphql/.mocharc.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"bail": true,
3+
"reporter": "spec",
4+
"colors": true,
5+
"timeout": 60000,
6+
"exit": true,
7+
"require": ["ts-node/register", "source-map-support/register"]
8+
}

examples/v4/graphql/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# GraphQL + Pact
2+
3+
Demonstrates how to do Pact testing against a GraphQL endpoint. This is a POC, demonstrating how PactJS could provide a simple helper function that wraps the GraphQL request into a basic Interaction suitable for Pact (after all, GraphQL is simply an interface over HTTP).
4+
5+
Test it out here:
6+
7+
```
8+
npm run test:consumer
9+
npm run test:provider
10+
```

0 commit comments

Comments
 (0)