救命啊!我只是想让我的管道成功运行TT任何人都可以帮助我~
情况:我正在将 Apollo 客户端集成到我的 iOS 项目中,并遵循 Apollo 官方提供的说明 - https://www.apollographql.com/docs/ios/installation(使用 SPM 方式设置)。在 Xcode 手动编译和测试中,它对我来说一切正常。然而,当我使用命令运行单元测试时,我在生成 Apollo GraphQL API 时遇到了困难。以下是我在运行时收到的错误
xcodebuild test -scheme ${CI_PROJECT_NAME} -project ${CI_PROJECT_NAME}.xcodeproj -destination "${XCODE_APPLICATION_PLATFORM}" -enableCodeCoverage YES| xcpretty -s
错误: xcodebuild[10347:2192409] NSFileHandle couldn't write. Exception: *** -[_NSStdIOFileHandle writeData:]: Broken pipe
注意:当我在 Gitlab 管道中通过命令行运行单元测试时,会发生此错误。使用 Xcode 13.2.1。
我正在尝试使用apollo ios客户端实现graphql订阅。但是由于缺乏文档示例,因此无法弄清楚。阿波罗文档上给出的示例是:
let apollo: ApolloClient = {
let configuration = URLSessionConfiguration.default
// Add additional headers as needed
configuration.httpAdditionalHeaders = ["Authorization": "Bearer <token>"] // Replace `<token>`
let url = URL(string: "http://localhost:8080/graphql")!
return ApolloClient(networkTransport: HTTPNetworkTransport(url: url, configuration: configuration))
}()
Run Code Online (Sandbox Code Playgroud)
我正在使用 Apollo SDK,它生成一个 API.swift 文件。我们可以从代码覆盖率中排除这个文件吗
我正在尝试集成 apollo iOS 客户端,在完成所有步骤后,我在运行构建阶段脚本时收到错误。所以一共有三个错误。一个是
请注意,这是在node_modules/@oclif 内部发生的。
Error initializing Apollo GraphQL project "Unnamed Project": Error: Error in "Loading schema for Unnamed Project": TypeError: Cannot read property 'reduce' of undefined
我正在尝试在 Xcode 10 上构建一个示例 Apollo-IOS。我已按照文档中描述的所有步骤进行操作:
有如下错误
++ npx --no-install apollo codegen:generate --queries=./GraphQL/Queries.graphql --schema=schema.json API.swift --passthroughCustomScalars
[?25l[22:26:11] Loading Apollo config [started]
[22:26:11] Loading Apollo config [completed]
[22:26:11] Resolving GraphQL document sets and dependencies [started]
[22:26:11] Scanning for GraphQL queries (1 found) [title changed]
[22:26:11] Scanning for GraphQL queries (1 found) [completed]
[22:26:11] Generating query files [started]
[22:26:11] Generating query files with 'swift' target [title changed]
[22:26:11] Generating query files with 'swift' target [failed]
[22:26:11] ? Cannot read property 'getType' …
Run Code Online (Sandbox Code Playgroud) 我需要将我的数据缓存在磁盘上以供离线查看,我在 apollo-ios 源中找到了 ApolloSQLite,但是我找不到 ApolloSQLite 的任何文档(我也尝试过谷歌搜索)。
环境:
Xcode 10.1
macOS 10.14.3
CocoaPods 1.5.3
Apollo (0.9.5)
SQLite.swift (0.11.5)
Run Code Online (Sandbox Code Playgroud)
之后出现太多错误pod install
:
pod 'Apollo'
pod 'Apollo/SQLite'
Run Code Online (Sandbox Code Playgroud)