基于字段值动态更改GraphiQL中的查询

问题描述

我在 GraphiQL 中运行此查询

query getArticles {
  articleCollection(limit:2) {
    items {
      title
      shortDescription
      url
      openGraphTagsCollection {
        items {
          openGraphTag {
            TAG:codeId
          }
          textValue
          imageValue {
            url
          }
          urlValue
          booleanValue
          referenceValue {
            ... on Article {
              title
              url
            }
          }
        }
      }
    }
  }
}

根据 TAG 值(在 OpenGraphTag 中),我想返回 referenceValue 中的“title”或“url”(...on Article)。我怎样才能在 GraphiQL 中做到这一点?我尝试了 @include 指令,但不起作用。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)