{"id":21528222,"url":"https://github.com/znsio/specmatic-order-bff-graphql-java","last_synced_at":"2025-07-13T01:13:58.908Z","repository":{"id":247353485,"uuid":"801345850","full_name":"znsio/specmatic-order-bff-graphql-java","owner":"znsio","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-13T13:01:08.000Z","size":7365,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-06-28T01:05:20.358Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/znsio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"License.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-05-16T03:55:46.000Z","updated_at":"2025-05-13T13:01:09.000Z","dependencies_parsed_at":"2024-08-27T14:16:56.869Z","dependency_job_id":"8221d6fa-e469-4c16-a495-c201aa44934e","html_url":"https://github.com/znsio/specmatic-order-bff-graphql-java","commit_stats":null,"previous_names":["znsio/specmatic-order-bff-graphql-java"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/znsio/specmatic-order-bff-graphql-java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/znsio%2Fspecmatic-order-bff-graphql-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/znsio%2Fspecmatic-order-bff-graphql-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/znsio%2Fspecmatic-order-bff-graphql-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/znsio%2Fspecmatic-order-bff-graphql-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/znsio","download_url":"https://codeload.github.com/znsio/specmatic-order-bff-graphql-java/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/znsio%2Fspecmatic-order-bff-graphql-java/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265077553,"owners_count":23707707,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-24T01:52:16.229Z","updated_at":"2025-07-13T01:13:58.875Z","avatar_url":"https://github.com/znsio.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Application Architecture](./Architecture.gif)\n\n# GraphQL Contract Testing Using Specmatic\n\n* [Specmatic Website](https://specmatic.in)\n* [Specmatic Documenation](https://specmatic.in/documentation.html)\n\nThis sample project demonstrates how we can practice contract-driven development and contract testing in a GraphQL (Kotlin) API that depends on an external domain service. Here, Specmatic is used to stub calls to domain API service based on its OpenAPI specification.\n\n### Starting the server\n\nRun the following script on Linux:\n\n```shell\nchmod u+x gradlew\n./gradlew bootRun\n```\n\nOn Windows:\n\n```commandline\ngradlew bootRun\n```\n\nYou'll need the backend product API server running for this to work. You can get it from [here](https://github.com/znsio/specmatic-order-api-java). The README.md file in the repo contain instructions for starting up the backend API server.\n\nVisit http://localhost:8080/graphiql to access the GraphiQL interface.\n\n### Running the contract tests using Docker\n\n1. Start the Specmatic http stub server to emulate domain service:\n\n   ```shell\n      docker run --network host -p 8090:8090 -v \"$(pwd)/specmatic.yaml:/usr/src/app/specmatic.yaml\" znsio/specmatic virtualize --port=8090\n   ```\n\n2. Build and run the BFF service (System Under Test) in a Docker container:\n\n   ```shell\n   docker build --no-cache -t specmatic-order-bff-graphql .\n   ```\n\n   ```shell\n   docker run -p 8080:8080 specmatic-order-bff-graphql\n   ```\n\n   OR, you can run the application locally with `./gradlew bootRun`\n\n3. Finally, run Specmatic Contract on the BFF service (System Under Test):\n\n   ```shell\n   docker run --network host -v \"$(pwd)/specmatic.yaml:/usr/src/app/specmatic.yaml\" -v \"$(pwd)/build/reports/specmatic:/usr/src/app/build/reports/specmatic\"  -e SPECMATIC_GENERATIVE_TESTS=true znsio/specmatic-graphql test --port=8080 --host=host.docker.internal\n   ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fznsio%2Fspecmatic-order-bff-graphql-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fznsio%2Fspecmatic-order-bff-graphql-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fznsio%2Fspecmatic-order-bff-graphql-java/lists"}