Skip to content

Commit 106357e

Browse files
author
Robert Mosolgo
authored
Merge pull request #3287 from rmosolgo/prep-1.12
Prep 1.12
2 parents 5ed03ed + 07d6ba6 commit 106357e

File tree

4 files changed

+32
-12
lines changed

4 files changed

+32
-12
lines changed

CHANGELOG.md

+26
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,32 @@
88

99
### Bug fixes
1010

11+
# 1.12.0 (19 January 2021)
12+
13+
### Breaking changes
14+
15+
- `GraphQL::Schema` defaults to `GraphQL::Execution::Interpreter`, `GraphQL::Analysis::AST`, `GraphQL::Pagination::Connections`, and `GraphQL::Execution::Errors`. (#3145) To get the previous (deprecated) behaviors:
16+
17+
```ruby
18+
# revert to deprecated execution behaviors:
19+
use GraphQL::Execution::Execute
20+
use GraphQL::Analysis
21+
```
22+
- `GraphQL::Execution::Interpreter::Arguments` instances are frozen (#3138). (Usually, GraphQL code doesn't interact with these objects, but they're used some places under the hood.)
23+
24+
### Deprecations
25+
26+
- Many, many legacy classes and methods were deprecated. #3275 Deprecation errors include links to migration documentation. For a full list, see: https://github.com/rmosolgo/graphql-ruby/issues/3056
27+
28+
### New features
29+
30+
- Rails-like argument validations (#3207)
31+
- Fiber-based `GraphQL::Dataloader` for batch-loading data #3264
32+
- Connection and edge behaviors are available as mixins #3071
33+
- Schema definition supports schema directives #3224
34+
35+
### Bug fixes
36+
1137
# 1.11.7 (18 January 2021)
1238

1339
### Breaking changes

lib/graphql/schema/resolver/has_payload_type.rb

-10
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,6 @@ def object_class(new_class = nil)
4646

4747
NO_INTERFACES = [].freeze
4848

49-
def return_interfaces(new_interfaces = nil)
50-
if new_interfaces
51-
@return_interfaces = new_interfaces
52-
else
53-
@return_interfaces || find_inherited_value(:return_interfaces, NO_INTERFACES)
54-
end
55-
end
56-
5749
private
5850

5951
# Build a subclass of {.object_class} based on `self`.
@@ -62,10 +54,8 @@ def return_interfaces(new_interfaces = nil)
6254
def generate_payload_type
6355
resolver_name = graphql_name
6456
resolver_fields = fields
65-
interfaces = return_interfaces
6657
Class.new(object_class) do
6758
graphql_name("#{resolver_name}Payload")
68-
implements(*interfaces)
6959
description("Autogenerated return type of #{resolver_name}")
7060
resolver_fields.each do |name, f|
7161
# Reattach the already-defined field here

lib/graphql/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# frozen_string_literal: true
22
module GraphQL
3-
VERSION = "1.11.7"
3+
VERSION = "1.12.0"
44
end

spec/graphql/schema/relay_classic_mutation_spec.rb

+5-1
Original file line numberDiff line numberDiff line change
@@ -316,9 +316,13 @@ module ErrorInterface
316316
field :error, String, null: true
317317
end
318318

319+
class BaseReturnType < GraphQL::Schema::Object
320+
implements ResultInterface, ErrorInterface
321+
end
322+
319323
class ReturnTypeWithInterfaceTest < GraphQL::Schema::RelayClassicMutation
320324
field :name, String, null: true
321-
return_interfaces [ResultInterface, ErrorInterface]
325+
object_class BaseReturnType
322326

323327
def resolve
324328
{

0 commit comments

Comments
 (0)