graphql-schema_comparator 1.1.0 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fbc98aaf530ce8c60dc291eac091f735180bedd7962f4229d6fc9ad19fcf02a9
4
- data.tar.gz: e80de95b6b466297e8c69679cd2f4590f7bc77072573df004b0c8e266e06a9ef
3
+ metadata.gz: 9b44c88f5ca678f250a1f7a90021d7ae5cae95a899b524ed8551878329de7e53
4
+ data.tar.gz: d49d50b3d029030a09170773db81b493f7ffb781006238129bfb17bcdf625301
5
5
  SHA512:
6
- metadata.gz: 22b0ef77facfe02f84f0d14004c4576d415d9b3c4b3fe46d06ed0a3750ea302180217c1aec1b54cdefd0517f66a0f89a61789643ad66031766205cc03e95459f
7
- data.tar.gz: 4e2251295877a04cfa6e15654470db736a52bda927be70dc0d3846e358d6d6d7d11553a04bfff383eb460d62b466bcb7610d3bb84d16fb613418af8d7884df4c
6
+ metadata.gz: a0d2435ef322c736c666d634e735720313d2befc4768dcdfb744209fce67d43bcc523c09c051c581de456fdcc82ff687dd072102088704f52a694ca13076052e
7
+ data.tar.gz: 8850e901ebe67bbc4400fb20617ab59cf33ddaf45469008a3cc7bbc27609fbef488747ffb4b6db95af4f0c4572f03fbf43fba9cd5d38eb4adef896ca58624256
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.1.2 (September 15 2022)
4
+
5
+ ### Bug Fix
6
+
7
+ - Fix field argument removed message (#51)
8
+ - Fix safe type change comparison (#53)
9
+
10
+ ## 1.1.1 (January 7 2022)
11
+
12
+ ### Bug Fix
13
+
14
+ - Fix directive type change false positive bug (#47)
15
+
3
16
  ## 1.1.0 (December 20 2021)
4
17
 
5
18
  ### Bug Fix
@@ -4,7 +4,7 @@ module GraphQL
4
4
  module SafeTypeChange
5
5
  def safe_change_for_field?(old_type, new_type)
6
6
  if !old_type.kind.wraps? && !new_type.kind.wraps?
7
- old_type == new_type
7
+ old_type.graphql_name == new_type.graphql_name
8
8
  elsif new_type.kind.non_null?
9
9
  of_type = old_type.kind.non_null? ? old_type.of_type : old_type
10
10
  safe_change_for_field?(of_type, new_type.of_type)
@@ -18,7 +18,7 @@ module GraphQL
18
18
 
19
19
  def safe_change_for_input_value?(old_type, new_type)
20
20
  if !old_type.kind.wraps? && !new_type.kind.wraps?
21
- old_type == new_type
21
+ old_type.graphql_name == new_type.graphql_name
22
22
  elsif old_type.kind.list? && new_type.kind.list?
23
23
  safe_change_for_input_value?(old_type.of_type, new_type.of_type)
24
24
  elsif old_type.kind.non_null?
@@ -169,7 +169,7 @@ module GraphQL
169
169
  end
170
170
 
171
171
  def message
172
- "Argument `#{argument.graphql_name}: #{argument.type.graphql_name}` was removed from field `#{object_type.graphql_name}.#{field.graphql_name}`"
172
+ "Argument `#{argument.graphql_name}: #{argument.type.to_type_signature}` was removed from field `#{object_type.graphql_name}.#{field.graphql_name}`"
173
173
  end
174
174
 
175
175
  def path
@@ -19,7 +19,7 @@ module GraphQL
19
19
  changes << Changes::DirectiveArgumentDefaultChanged.new(directive, old_arg, new_arg)
20
20
  end
21
21
 
22
- if old_arg.type != new_arg.type
22
+ if old_arg.type.to_type_signature != new_arg.type.to_type_signature
23
23
  changes << Changes::DirectiveArgumentTypeChanged.new(directive, old_arg, new_arg)
24
24
  end
25
25
 
@@ -1,5 +1,5 @@
1
1
  module GraphQL
2
2
  module SchemaComparator
3
- VERSION = "1.1.0"
3
+ VERSION = "1.1.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql-schema_comparator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marc-Andre Giroux
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-20 00:00:00.000000000 Z
11
+ date: 2022-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: graphql