You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
562 B
15 lines
562 B
import { getOperationDefinition } from "./getFromAST.js"; |
|
function isOperation(document, operation) { |
|
var _a; |
|
return ((_a = getOperationDefinition(document)) === null || _a === void 0 ? void 0 : _a.operation) === operation; |
|
} |
|
export function isMutationOperation(document) { |
|
return isOperation(document, "mutation"); |
|
} |
|
export function isQueryOperation(document) { |
|
return isOperation(document, "query"); |
|
} |
|
export function isSubscriptionOperation(document) { |
|
return isOperation(document, "subscription"); |
|
} |
|
//# sourceMappingURL=operations.js.map
|