【发布时间】:2020-01-21 01:20:36
【问题描述】:
所以我是 GraphQL 的新手,谁能告诉我如何将下面的代码更改为仅从我的帐户中检索公共回购?
我尝试使用“搜索”属性,但无法正常工作。
谢谢
const {
github: {
repositoryOwner: {
repositories: { edges },
},
},
} = useStaticQuery(graphql`
{
github {
repositoryOwner(login: "SzBor") {
repositories(first: 6, orderBy: { field: CREATED_AT, direction: ASC }) {
edges {
node {
id
name
url
description
}
}
}
}
}
}
`)
【问题讨论】:
-
那么当你执行这个的时候,结果是什么?您收到什么错误(如果有)?
标签: graphql github-api