-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
version bump with release notes and upgrade guide
- Loading branch information
River Lynn Bailey
committed
Mar 2, 2021
1 parent
755262f
commit 4f24b64
Showing
3 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Release Notes | ||
|
||
Release notes for various versions of RSpec::GraphQLResponse | ||
|
||
See [the upgrade guide](/UPGRADE.md) for details on changes between versions and how to upgrade. | ||
|
||
## v0.2.0 - GraphQL Configuration DSL and Refactorings | ||
|
||
Misc changes and corrections, some new features, and generally trying to create a more robust | ||
and usable experience, right out of the box. | ||
|
||
### New Features | ||
|
||
* Significantly improved documentation | ||
* `have_operation` matcher | ||
* GraphQL configuration DSL | ||
* `graphql_query` | ||
* `graphql_variables` | ||
* `graphql_context` | ||
* Describe/Context level RSpec helper methods via `.add_context_helper` DSL | ||
|
||
### Breaking Changes | ||
|
||
This release changes the graphql query, variables and context configuration away from `let` vars | ||
and into a proper DSL. | ||
|
||
### Bug Fixes | ||
|
||
Lots of misc bug fixes, including caching of values, ensuring things work in nested contexts, etc. | ||
|
||
## v0.1.0 - Initial Release | ||
|
||
Early beta work to get this out the door and begin adoption | ||
|
||
* `have_errors` matcher | ||
* `operation` helper | ||
* `response` helper | ||
* `execute_graphql` helper | ||
* DSL for adding custom matchers, validators, and helpers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Upgrade Guide | ||
|
||
## v0.1.0 to v0.2.0 | ||
|
||
There is a breaking change between v0.1.0 and v0.2.0 regarding the configuration of graphql queries, variables and context. | ||
Previously, you defined these three items with `let` in rspec: | ||
|
||
```ruby | ||
let(:graphql_query) { ... } | ||
``` | ||
|
||
In v0.2.0, this changes to a new DSL for each of these three items: | ||
|
||
```ruby | ||
RSpec.describe My::Stuff, type: :graphql do | ||
|
||
graphql_query <<-GQL | ||
query Characters($name: String) { | ||
characters(name: $name) { | ||
id | ||
name | ||
} | ||
} | ||
GQL | ||
|
||
graphql_variables({ | ||
name: "Jam" | ||
}) | ||
|
||
graphql_context({ | ||
some: "context here", | ||
current_user: some_user | ||
}) | ||
|
||
it " ... " | ||
end | ||
``` |