Skip to content

Commit 846da91

Browse files
committed
Update introspectionResolvers
1 parent 099b6cf commit 846da91

File tree

1 file changed

+6
-0
lines changed
  • libraries/apollo-execution/src/commonMain/kotlin/com/apollographql/apollo/execution/internal

1 file changed

+6
-0
lines changed

libraries/apollo-execution/src/commonMain/kotlin/com/apollographql/apollo/execution/internal/introspection.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,12 @@ internal fun introspectionResolvers(schema: Schema): Map<String, Resolver> {
263263
"description" to Resolver {
264264
it.parentObject.cast<GQLDirectiveDefinition>().description
265265
},
266+
"isDeprecated" to Resolver {
267+
it.parentObject.cast<GQLDirectiveDefinition>().directives.findDeprecationReason() != null
268+
},
269+
"deprecationReason" to Resolver {
270+
it.parentObject.cast<GQLDirectiveDefinition>().directives.findDeprecationReason()
271+
},
266272
"isRepeatable" to Resolver {
267273
it.parentObject.cast<GQLDirectiveDefinition>().repeatable
268274
},

0 commit comments

Comments
 (0)