GraphQLディレクティブ
@deprecated(reason: String) - フィールドを廃止予定としてマークします
@skip (if: Boolean) -このフィールドのGraphQLの実行をスキップします
@include (if: Boolean) - trueの場合、注釈付きフィールドのリゾルバーを呼びます。
code:graphql
query ($showFullname: Boolean!) {
author {
id
name
fullname @include(if: $showFullname)
}
}
条件がtrueの場合のみfullnameは含まれる