Skip to content

Commit

Permalink
version bump with release notes and upgrade guide
Browse files Browse the repository at this point in the history
  • Loading branch information
River Lynn Bailey committed Mar 2, 2021
1 parent 755262f commit 4f24b64
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ Or install it yourself as:

## Full Documentation

* [Release Notes](/RELEASE_NOTES.md)
* [Upgrade Guide](/UPGRADE.md)

The full documentation for RSpec::GraphQLResponse can be found in the `/docs` folder.

Configuration:
Expand Down
39 changes: 39 additions & 0 deletions RELEASE_NOTES.md
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
37 changes: 37 additions & 0 deletions UPGRADE.md
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
```

0 comments on commit 4f24b64

Please sign in to comment.