Skip to content

Commit

Permalink
Merge pull request #76 from d-exclaimation/validation-fix
Browse files Browse the repository at this point in the history
Fix: Fixed Sendable on validation rule
  • Loading branch information
d-exclaimation authored Jul 16, 2022
2 parents c273d4b + 1649f5c commit 4890bf1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Documentation/references/enums.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,4 +322,4 @@ let server = Pioneer(

### ValidationRule

Typealias for `@Sendable (ValidationContext) -> Visitor`
Typealias for `(ValidationContext) -> Visitor`
4 changes: 2 additions & 2 deletions Sources/Pioneer/Utils/Validation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
import GraphQL

/// Function that describe a validation rule for an operation
public typealias ValidationRule = @Sendable (ValidationContext) -> Visitor
public typealias ValidationRule = (ValidationContext) -> Visitor

extension Pioneer {
/// Validation strategy to add custom rules that is executed before any resolver is executed
public enum Validations: ExpressibleByArrayLiteral, ExpressibleByNilLiteral, Sendable {
public enum Validations: @unchecked Sendable, ExpressibleByArrayLiteral, ExpressibleByNilLiteral {
public init(nilLiteral: ()) {
self = .none
}
Expand Down

0 comments on commit 4890bf1

Please sign in to comment.