From 4f24b645e7ce1e795447a31a4e411646379c7d46 Mon Sep 17 00:00:00 2001 From: River Lynn Bailey Date: Tue, 2 Mar 2021 10:07:55 -0600 Subject: [PATCH] version bump with release notes and upgrade guide --- README.md | 3 +++ RELEASE_NOTES.md | 39 +++++++++++++++++++++++++++++++++++++++ UPGRADE.md | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 79 insertions(+) create mode 100644 RELEASE_NOTES.md create mode 100644 UPGRADE.md diff --git a/README.md b/README.md index 79e29d2..cbe038c 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md new file mode 100644 index 0000000..9cad5c9 --- /dev/null +++ b/RELEASE_NOTES.md @@ -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 diff --git a/UPGRADE.md b/UPGRADE.md new file mode 100644 index 0000000..3b73495 --- /dev/null +++ b/UPGRADE.md @@ -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 +```