Skip to content

GraphQL#

GraphQL 是一种用于 API 的开源数据查询和操作语言,以及一个用于使用现有数据执行查询的运行时环境。使用 GraphQL 节点查询 GraphQL 端点。

¥GraphQL is an open-source data query and manipulation language for APIs, and a runtime for fulfilling queries with existing data. Use the GraphQL node to query a GraphQL endpoint.

节点参数#

¥Node parameters

This node can be used as an AI tool

This node can be used to enhance the capabilities of an AI agent. When used in this way, many parameters can be set automatically, or with information directed by AI - find out more in the AI tool parameters documentation.

验证#

¥Authentication

选择要使用的身份验证类型。

¥Select the type of authentication to use.

如果你选择除“无”以外的任何选项,则会显示“ 的凭据”参数,供你选择现有凭据或为该身份验证类型创建新的身份验证凭据。

¥If you select anything other than None, the Credential for parameter appears for you to select an existing or create a new authentication credential for that authentication type.

HTTP 请求方法#

¥HTTP Request Method

选择节点应使用的底层 HTTP 请求方法。选择以下选项:

¥Select the underlying HTTP Request method the node should use. Choose from:

  • GET

  • POST:如果你选择此方法,你还需要选择节点应用于查询有效负载的请求格式。选择以下选项:

¥POST: If you select this method, you'll also need to select the Request Format the node should use for the query payload. Choose from:

  • GraphQL(原始)

    ¥GraphQL (Raw)

  • JSON

端点#

¥Endpoint

输入你要访问的 GraphQL 端点。

¥Enter the GraphQL Endpoint you'd like to hit.

忽略 SSL 问题#

¥Ignore SSL Issues

当你启用此控件时,n8n 会忽略 SSL 证书验证失败。

¥When you turn on this control, n8n ignores SSL certificate validation failure.

查询#

¥Query

输入你要执行的 GraphQL 查询。

¥Enter the GraphQL query you want to execute.

有关编写查询的信息,请参阅 相关资源

¥Refer to Related Resources for information on writing your query.

响应格式#

¥Response Format

选择查询结果的接收格式。选择以下选项:

¥Select the format you'd like to receive query results in. Choose between:

  • JSON

  • 字符串:如果你选择此格式,请输入“响应数据属性名称”以定义要写入字符串的属性。

¥String: If you select this format, enter a Response Data Property Name to define the property the string is written to.

标头#

¥Headers

以名称/值对的形式输入要作为查询一部分传递的任何标头。

¥Enter any Headers you want to pass as part of the query as Name / Value pairs.

模板和示例#

¥Templates and examples

Template widget placeholder.

相关资源#

¥Related resources

要使用 GraphQL 节点,你需要了解 GraphQL 查询语言。GraphQL 有自己的 GraphQL 简介 教程。

¥To use the GraphQL node, you need to understand GraphQL query language. GraphQL have their own Introduction to GraphQL tutorial.