Skip to content

Commit

Permalink
feat: add GraphQL support to PactV4
Browse files Browse the repository at this point in the history
- Refactors the GraphQL common utilities into a single package
- Refactors the V4 HTTP package into multiple files (lint)
  • Loading branch information
mefellows committed Jul 7, 2024
1 parent 19acb7f commit bc92d4b
Show file tree
Hide file tree
Showing 37 changed files with 6,341 additions and 428 deletions.
2 changes: 2 additions & 0 deletions examples/v4/graphql/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
src/*.js
src/*.d.ts
8 changes: 8 additions & 0 deletions examples/v4/graphql/.mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"bail": true,
"reporter": "spec",
"colors": true,
"timeout": 60000,
"exit": true,
"require": ["ts-node/register", "source-map-support/register"]
}
10 changes: 10 additions & 0 deletions examples/v4/graphql/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# GraphQL + Pact

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).

Test it out here:

```
npm run test:consumer
npm run test:provider
```
Loading

0 comments on commit bc92d4b

Please sign in to comment.