Skip to content

Commit d7c943c

Browse files
committed
Add description support to scalar definition.
1 parent b3b155a commit d7c943c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sources/Graphiti/Scalar.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public final class Scalar<RootType : Keyable, Context, ScalarType : Codable> : C
5757
override func update(builder: SchemaBuilder) throws {
5858
let scalarType = try GraphQLScalarType(
5959
name: name ?? Reflection.name(for: ScalarType.self),
60+
description: description,
6061
serialize: { value in
6162
guard let scalarValue = value as? ScalarType else {
6263
throw GraphQLError(message: "Serialize expected type \(ScalarType.self) but got \(type(of: value))")

0 commit comments

Comments
 (0)