Skip to content

Commit f1d3e38

Browse files
committed
Fix introspection query encoding
1 parent ac9fbbc commit f1d3e38

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

Package.resolved

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"repositoryURL": "https://github.com/apple/swift-nio.git",
1616
"state": {
1717
"branch": null,
18-
"revision": "120acb15c39aa3217e9888e515de160378fbcc1e",
19-
"version": "2.18.0"
18+
"revision": "154f1d32366449dcccf6375a173adf4ed2a74429",
19+
"version": "2.38.0"
2020
}
2121
}
2222
]

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ let package = Package(
77
.library(name: "GraphQL", targets: ["GraphQL"]),
88
],
99
dependencies: [
10-
.package(url: "https://github.com/apple/swift-nio.git", .upToNextMajor(from: "2.10.1")),
10+
.package(url: "https://github.com/apple/swift-nio.git", .upToNextMajor(from: "2.38.0")),
1111
.package(url: "https://github.com/apple/swift-collections", .upToNextMajor(from: "1.0.0")),
1212
],
1313
targets: [

Sources/GraphQL/Utilities/GetIntrospectionQuery.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,13 @@ struct IntrospectionSchema: Codable {
124124
let types: [AnyIntrospectionType]
125125
// let directives: [IntrospectionDirective]
126126

127-
func encode(to encoder: Encoder) throws {
128-
try types.encode(to: encoder)
129-
}
127+
// func encode(to encoder: Encoder) throws {
128+
// try types.encode(to: encoder)
129+
// }
130130
}
131131

132132
protocol IntrospectionType: Codable {
133-
static var kind: TypeKind2 { get }
133+
var kind: TypeKind2 { get }
134134
var name: String { get }
135135
}
136136

@@ -212,22 +212,22 @@ struct AnyIntrospectionType: Codable {
212212
//extension IntrospectionInputObjectType: IntrospectionInputType {}
213213
//
214214
struct IntrospectionScalarType: IntrospectionType {
215-
static let kind = TypeKind2.scalar
215+
var kind = TypeKind2.scalar
216216
let name: String
217217
let description: String?
218218
let specifiedByURL: String?
219219
}
220220

221221
struct IntrospectionObjectType: IntrospectionType {
222-
static let kind = TypeKind2.object
222+
var kind = TypeKind2.object
223223
let name: String
224224
let description: String?
225225
let fields: [IntrospectionField]?
226226
let interfaces: [IntrospectionTypeRef]?
227227
}
228228

229229
struct IntrospectionInterfaceType: IntrospectionType {
230-
static let kind = TypeKind2.interface
230+
var kind = TypeKind2.interface
231231
let name: String
232232
let description: String?
233233
let fields: [IntrospectionField]?
@@ -236,21 +236,21 @@ struct IntrospectionInterfaceType: IntrospectionType {
236236
}
237237

238238
struct IntrospectionUnionType: IntrospectionType {
239-
static let kind = TypeKind2.union
239+
var kind = TypeKind2.union
240240
let name: String
241241
let description: String?
242242
let possibleTypes: [IntrospectionTypeRef]
243243
}
244244

245245
struct IntrospectionEnumType: IntrospectionType {
246-
static let kind = TypeKind2.enum
246+
var kind = TypeKind2.enum
247247
let name: String
248248
let description: String?
249249
let enumValues: [IntrospectionEnumValue]
250250
}
251251

252252
struct IntrospectionInputObjectType: IntrospectionType {
253-
static let kind = TypeKind2.inputObject
253+
var kind = TypeKind2.inputObject
254254
let name: String
255255
let description: String?
256256
let inputFields: [IntrospectionInputValue]

0 commit comments

Comments
 (0)