小编foo*_*ing的帖子

Graphql 无法返回数组

我正在使用并尝试针对IEX REST APIApollo-Server创建 REST 查询,该查询返回如下所示的数据:

{
  "symbol": "AAPL",
  "companyName": "Apple Inc.",
  "exchange": "Nasdaq Global Select",
  "industry": "Computer Hardware",
  "website": "http://www.apple.com",
  "description": "Apple Inc is an American multinational technology company. It designs, manufactures, and markets mobile communication and media devices, personal computers, and portable digital music players.",
  "CEO": "Timothy D. Cook",
  "issueType": "cs",
  "sector": "Technology",
  "tags": [
      "Technology",
      "Consumer Electronics",
      "Computer Hardware"
  ]
}
Run Code Online (Sandbox Code Playgroud)

我正在使用数据源。我typeDefsresolvers看起来像这样:

const typeDefs = gql`
    type Query{
        stock(symbol:String): …
Run Code Online (Sandbox Code Playgroud)

javascript apollo graphql graphql-js apollo-server

3
推荐指数
1
解决办法
4775
查看次数

标签 统计

apollo ×1

apollo-server ×1

graphql ×1

graphql-js ×1

javascript ×1