首页 > 解决方案 > 如何使用 gatsby-cloudinary-plugin 进行过滤

问题描述

我尝试在 gatsby 中过滤来自 cloudinary 的查询。

我在graphql中试过这个:

query {
       allCloudinaryMedia (
           filter: {
                tags: {
                  eq: "antwerp"
                  }
             }
        ) {
           edges {
            node {
              id
              resource_type
              url
               }
           }
       }
}

我在 cloudinary 中将一张照片标记为“安特卫普”。没有错误,但没有任何显示。

标签: gatsbycloudinary

解决方案


我排序。安装插件后,我们需要在文件“gatsby-config.js”中为插件设置一个配置,就像我做的那样。但是在选项中我错过了将选项标签设置为 true。


推荐阅读