Reputation: 1063
I have standart factories in my angular app for rest api. I need to configure my angular app for api with GraphQl. How i can do this? I now about angular2-apollo but I have angular 1.5.
Upvotes: 7
Views: 7836
Reputation: 3469
Here is a live example. Basically the biggest part is how to set up the client in the config, from there you can just use it like any other service.
https://codesandbox.io/s/l4r87nqj5z
Edit: this actually uses the library in Kamil's answer.
Upvotes: 0
Reputation: 509
You can use angular1-apollo
package.
http://github.com/apollostack/angular1-apollo
Upvotes: 11
Reputation: 3185
Yes you can use Apollo-Client and just wrap the functions with $q.
Here is an example (Look at the Angular1App folder): https://github.com/robzhu/graphql-demo
Upvotes: 8