graphql-contract-test

0.0.11 • Public • Published

GraphQL Contract Test

npm version

Consumer driven contract testing for GraphQL APIs.

Usage

  GraphQL Contract Test v0.0.10


  Check if the remote server fulfills the supplied GraphQL contract file

  Usage: graphql-contract-test ENDPOINT_URL client_schema_file

  Options:
    --header, -h         Add a custom header (ex. 'Authorization=Bearer ...'), can be used multiple times
    --ignore-directives  Exclude directive changes from the comparison

Where client-schema.graphql contains the schema you expect the server to implement.

An introspection query will be made against the API, any breaking changes will be reported

Docker Image

Place your schema.graphqls file in the current working directory then exec:

docker run \
    --rm \
    -t \
    -v $(PWD)/schema.graphqls:/schema.graphqls \
    symm/graphql-contract-test:latest \
    https://your-api-here /schema.graphqls

Readme

Keywords

none

Package Sidebar

Install

npm i graphql-contract-test

Weekly Downloads

2

Version

0.0.11

License

MIT

Unpacked Size

18.2 kB

Total Files

13

Last publish

Collaborators

  • symm