(directives, schemaMember)
| 39 | } |
| 40 | |
| 41 | async function getDeprecationReason(directives, schemaMember) { |
| 42 | if (!schemaMember.isDeprecated) return |
| 43 | |
| 44 | // it's possible for a schema member to be deprecated and under preview |
| 45 | const deprecationDirective = directives.filter((dir) => dir.name.value === 'deprecated') |
| 46 | |
| 47 | // catch any schema members that have more than one deprecation (none currently) |
| 48 | if (deprecationDirective.length > 1) |
| 49 | console.log(`more than one deprecation found for ${schemaMember.name}`) |
| 50 | |
| 51 | return renderContent(deprecationDirective[0].arguments[0].value.value) |
| 52 | } |
| 53 | |
| 54 | function getDeprecationStatus(directives) { |
| 55 | if (!directives.length) return |
nothing calls this directly
no test coverage detected