希望获得有关在iOS Apollo SDK上设置APQ的帮助,使用Apollo 1.2.2版本,并在打开APQ时如下所示:
let transport = RequestChainNetworkTransport(interceptorProvider: provider,
endpointURL: url,
autoPersistQueries: true)
在查询获取时出错,原因如下:
Apollo/RequestBodyCreator.swift:47: Fatal error: To enable autoPersistQueries, Apollo types must be generated with operationIdentifiers
我确实将此片段添加到config中,并通过config重新运行了code gen:
"options": {
"operationDocumentFormat" : [
"definition",
"operationId"
]
}