Skip to content

Commit 0cb301c

Browse files
chore: Deprecate result.operationType and result.isSubscription
1 parent 8de2349 commit 0cb301c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Sources/GraphQL/GraphQLRequest.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,17 @@ public struct GraphQLRequest: Equatable, Codable, Sendable {
2626
///
2727
/// - Returns: True if request is a subscription, false if it is an atomic operation (like
2828
/// `query` or `mutation`)
29+
@available(*, deprecated, message: "Use `parse` and extract operation manually instead")
2930
public func isSubscription() throws -> Bool {
3031
return try operationType() == .subscription
3132
}
3233

33-
/// The type of operation perfomed by the request.
34+
/// The type of operation performed by the request.
3435
/// This operation performs an entire AST parse on the GraphQL request, so consider
3536
/// performance when calling multiple times.
3637
///
3738
/// - Returns: The operation type performed by the request
39+
@available(*, deprecated, message: "Use `parse` and extract operation manually instead")
3840
public func operationType() throws -> OperationType {
3941
let documentAST = try GraphQL.parse(
4042
source: Source(body: query, name: "GraphQL request")

0 commit comments

Comments
 (0)