概述

特定模式查询

当您定义一个模式时,TinaCMS将生成一个GraphQL API,将您的本地文件系统视为数据库。您可以通过CLI在本地提供此模式,或者从TinaCloud中使用它。

GraphQL API将生成特定于您定义的模式的查询。

可用查询

  • <collection>
  • <collection>Connection

可用变更

  • update<collection>
  • addPendingDocument

对于给定的集合,其name将用于生成<collection><collection>Connection查询,以及update<collection>变更。

通用查询

作为特定模式查询的替代方案,GraphQL API还提供以下通用查询:

  • document
  • collection
  • collections
  • addPendingDocument
  • updateDocument

示例模式

使用以下模式,我们将向您展示如何使用每个特定模式的查询/变更。

Last Edited: June 16, 2025