Skip to content

Commit

Permalink
🚀 0.8.0!
Browse files Browse the repository at this point in the history
  • Loading branch information
nilwurtz committed Dec 8, 2023
1 parent 98d6731 commit 1bab403
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
### Added

### Changed

## [0.8.0] - 2023-12-08
### Changed
- Implemented `graphql-java`'s `AstSorter` and `AstComparator` for GraphQL query normalization. This integration significantly aligns the supported GraphQL features of our extension with those of `graphql-java`. ([#14](https://github.com/wiremock/wiremock-graphql-extension/pull/14) from @kyle-winkelman)

Expand Down
15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ GraphqlBodyMatcherは[WireMock](https://wiremock.org/)の拡張で、GraphQLの

## Overview 📖

- In addition to handling whitespaces, the extension sorts and normalizes queries. The GraphQL parsing is handled by `graphql-java`.
- In addition to handling whitespaces, the extension sorts and normalizes queries. The GraphQL parsing and normalizing is handled by `graphql-java`.
- Beyond just queries, it also compares variables. For the comparison of JSON variables, `org.json.JSONObject.similar` is employed. It's important to note that the order of arrays must match.

For a comprehensive understanding of our matching logic and details on our match strategy, please refer to our [MatchStrategy documentation](./docs/MatchStrategy.md).

- この拡張機能は、空白の取り扱いに加えて、クエリをソートし正規化します。GraphQLのパースには`graphql-java`を使用しています。
- この拡張機能は、空白の取り扱いに加えて、クエリをソートし正規化します。GraphQLのパースおよび正規化には`graphql-java`を使用しています。
- クエリだけでなく、変数も比較されます。変数のJSONの比較には`org.json.JSONObject.similar`を使用しますが、配列の順番も一致している必要があります。

詳しいマッチングロジックなど関しては、[MatchStrategyのドキュメント](./docs/MatchStrategy.md)を参照してください。
Expand All @@ -30,7 +30,7 @@ repositories {
}
dependencies {
testImplementation 'io.github.nilwurtz:wiremock-graphql-extension:0.7.1'
testImplementation 'io.github.nilwurtz:wiremock-graphql-extension:0.8.0'
}
```

Expand All @@ -40,7 +40,7 @@ dependencies {
<dependency>
<groupId>io.github.nilwurtz</groupId>
<artifactId>wiremock-graphql-extension</artifactId>
<version>0.7.1</version>
<version>0.8.0</version>
<scope>test</scope>
</dependency>
```
Expand Down Expand Up @@ -103,15 +103,15 @@ Please download `wiremock-graphql-extension-x.y.z-jar-with-dependencies.jar` fro
docker run -it --rm \
-p 8080:8080 \
--name wiremock \
-v /path/to/wiremock-graphql-extension-0.7.1-jar-with-dependencies.jar:/var/wiremock/extensions/wiremock-graphql-extension-0.7.1-jar-with-dependencies.jar \
-v /path/to/wiremock-graphql-extension-0.8.0-jar-with-dependencies.jar:/var/wiremock/extensions/wiremock-graphql-extension-0.8.0-jar-with-dependencies.jar \
wiremock/wiremock \
--extensions io.github.nilwurtz.GraphqlBodyMatcher
```

#### When building with `docker build`:
```dockerfile
FROM wiremock/wiremock:latest
COPY ./wiremock-graphql-extension-0.7.1-jar-with-dependencies.jar /var/wiremock/extensions/wiremock-graphql-extension-0.7.1-jar-with-dependencies.jar
COPY ./wiremock-graphql-extension-0.8.0-jar-with-dependencies.jar /var/wiremock/extensions/wiremock-graphql-extension-0.8.0-jar-with-dependencies.jar
CMD ["--extensions", "io.github.nilwurtz.GraphqlBodyMatcher"]
```

Expand All @@ -136,9 +136,6 @@ fun registerGraphQLWiremock(json: String) {
}
```

## Limitations 🚧
This project currently focuses on supporting the fundamental parts of Queries. Some advanced features, such as mutations or aliases, are not yet fully supported. However, I aim to expand this scope over time.

## License 📜
This project is licensed under the terms of the MIT License.

Expand Down
2 changes: 1 addition & 1 deletion e2e/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<dependency>
<artifactId>wiremock-graphql-extension</artifactId>
<groupId>io.github.nilwurtz</groupId>
<version>0.7.1</version>
<version>0.8.0</version>
</dependency>
<dependency>
<groupId>com.thoughtworks.gauge</groupId>
Expand Down
2 changes: 1 addition & 1 deletion wiremock-graphql-extension/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<artifactId>wiremock-graphql-extension</artifactId>
<groupId>io.github.nilwurtz</groupId>
<version>0.7.1</version>
<version>0.8.0</version>
<packaging>jar</packaging>
<name>wiremock-graphql-extension</name>
<description>A WireMock extension for handling GraphQL requests, allowing for easy mocking of GraphQL APIs in
Expand Down

0 comments on commit 1bab403

Please sign in to comment.