Skip to content

Commit 4493925

Browse files
author
Fred RAJAONA
committed
Fix introspection crash during tests
1 parent 23c141f commit 4493925

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ matrix:
88
include:
99
- os: osx
1010
env: JOB=SwiftPM_OSX
11-
osx_image: xcode10.2
11+
osx_image: xcode11
1212
- os: linux
1313
env: JOB=SwiftPM_linux
14-
dist: trusty
14+
dist: bionic
1515
sudo: required
1616
install:
1717
- travis_retry eval "$(curl -sL https://gist.githubusercontent.com/kylef/5c0475ff02b7c7671d2a/raw/9f442512a46d7a2af7b850d65a7e9bd31edfb09b/swiftenv-install.sh)"

Sources/GraphQL/Type/Introspection.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ let __Type: GraphQLObjectType = try! GraphQLObjectType(
229229
let fieldMap = type.fields
230230
var fields = Array(fieldMap.values).sorted(by: { $0.name < $1.name })
231231

232-
if !arguments["includeDeprecated"].bool! {
232+
if !(arguments["includeDeprecated"].bool ?? false) {
233233
fields = fields.filter({ !$0.isDeprecated })
234234
}
235235

@@ -240,7 +240,7 @@ let __Type: GraphQLObjectType = try! GraphQLObjectType(
240240
let fieldMap = type.fields
241241
var fields = Array(fieldMap.values).sorted(by: { $0.name < $1.name })
242242

243-
if !arguments["includeDeprecated"].bool! {
243+
if !(arguments["includeDeprecated"].bool ?? false) {
244244
fields = fields.filter({ !$0.isDeprecated })
245245
}
246246

@@ -285,7 +285,7 @@ let __Type: GraphQLObjectType = try! GraphQLObjectType(
285285

286286
var values = type.values
287287

288-
if !arguments["includeDeprecated"].bool! {
288+
if !(arguments["includeDeprecated"].bool ?? false) {
289289
values = values.filter({ !$0.isDeprecated })
290290
}
291291

0 commit comments

Comments
 (0)