UNPKG

@graphql-inspector/action

Version:

GraphQL Inspector functionality for GitHub Actions

16 lines (15 loc) 493 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isDeprecated = isDeprecated; function isDeprecated(fieldOrEnumValue) { if ('isDeprecated' in fieldOrEnumValue) { return !!fieldOrEnumValue['isDeprecated']; } if (fieldOrEnumValue.deprecationReason != null) { return true; } if (fieldOrEnumValue.astNode?.directives?.some(directive => directive.name.value === 'deprecated')) { return true; } return false; }