GraphQL
GraphQLToolSpec #
基类: BaseToolSpec
请求工具。
源代码位于 llama-index-integrations/tools/llama-index-tools-graphql/llama_index/tools/graphql/base.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|
graphql_request #
graphql_request(query: str, variables: str, operation_name: str)
使用此工具对服务器执行 GraphQL 查询。
参数
名称 | 类型 | 描述 | 默认值 |
---|---|---|---|
查询
|
str
|
要执行的 GraphQL 查询 |
必需 |
变量
|
str
|
查询的变量值 |
必需 |
operation_name
|
str
|
查询的名称 |
必需 |
输入示例
"query":"query Ships {\n ships {\n id\n model\n name\n type\n status\n }\n}", "variables":{}, "operation_name":"Ships"
源代码位于 llama-index-integrations/tools/llama-index-tools-graphql/llama_index/tools/graphql/base.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|