agentbase-docs

GraphQL

这是什么 / 何时用

以 GraphQL 查询/变更访问平台数据面,查询语法与 REST 数据模型一致。客户端与服务端都可用(客户端受用户 Session 与数据面权限约束)。

使用骨架

错误与边界

各语言调用示例

客户端与服务端均可用;Web 页签走用户 Session,受数据面权限约束。

import { Graphql } from 'agentbase-node-sdk';

const graphql = new Graphql(client);
const result = await graphql.query({ query: 'query { account { name email } }' });
await graphql.mutation({ query: 'mutation { /* 变更语句同 REST 数据模型 */ }' });

SDK 类别差异

事实源