graphql-community / apolloalamofire Goto Github PK
View Code? Open in Web Editor NEWAlamofire transport for Apollo iOS GraphQL library
License: MIT License
Alamofire transport for Apollo iOS GraphQL library
License: MIT License
Hello,
I'm trying to integrate your lib to test apollo in background mode but it doesn't compile.
This line is in error (l.32) :
let body = ["query": type(of: operation).requestString, "variables": vars]
I got an "Type 'Operation' has no member 'requestString'.
Can you tell me what I've missed ?
I'm on XCode 9.4, Swift 4.1.
Thx in advance,
EDIT: I manage to fix this issue (I think) by replacing type(of: operation).requestString
with operation.queryDocument
. Now, background websocket is not working but it's another issue :)
Aline
Is there a way I can read http header of the response?
I tried to run the example project, but there was nothing there, ViewController class was empty.
Could you please help check?
I realize Alamofire 5 is not yet out, but when doing some testing with 5.0.0.rc2, a GraphQL request will result in a crash:
return request.responseJSON { response in
.
.
.
}.task!
Unexpectedly found nil while unwrapping an Optional value
After running through the debugger, task
isn't always created right away.
As a temporary hack solution, I added a usleep
:
let request = sessionManager
.request(url, method: .post, parameters: body,
encoding: JSONEncoding.default, headers: headers)
.validate(statusCode: [200])
usleep(500)
if loggingEnabled {
debugPrint(request)
}
Has anyone else experienced this?
Pull request #5 has been merged a while ago, do you plan to release a v0.5 supporting Carthage soon ?
is it compatible for a new Xcode? Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.