-
-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] 1.0 #377
Conversation
disallow creating Apollo on NgModule level, allow for multiple links
Should have a better name though...
Been playing with this the last few days and so far almost no issues, big props for making it work so well with most of the old API! However, I think I'm doing it correct when i define my variables for my mutations, and from looking at the headers in my browser it would appear as if they are included but they dont seem to get attached to my query, which makes it complain. You can see my code example here: http://jmp.sh/wu0RocY And this is what i get back in my console when i try to run the query: GraphQL error: Variable "$email" of required type "String!" was not provided. Even though it shows quite clearly in the headers :) http://jmp.sh/l8d5vRo |
@Epenance Hi there! Thanks and that's great it works in your app. I tried to reproduce same thing you have, which is a mutation + named client. See |
@kamilkisiela Thanks for the quick reply, I'm trying to investigate why it wont work on my end, tried to pretty much 1 to 1 copy your example and I'm still having issues. I'll get back when I know more of have given up on my life. |
@Epenance try to make the same request but without Apollo. Same payload, same url etc. This way we could now if it's Apollo that causing an issue or the gql endpoint |
If i simply do it by putting it directly into the string like this it works: http://jmp.sh/BYE1GUA Btw, is there a better place i could write you so I dont fill up your PR with my "support" issue? |
@Epenance maybe the Apollo's Slack? Are you there? Same user handle as here, I have :yoda: |
f520709 allows to type the operation variables const addTodo = gql`
mutation addTodo($text: String!) {
addTodo(text: $text) {
id
text
}
}
`;
type Todo = {
id: number;
text: string;
};
type Mutation = {
addTodo: Todo;
};
type Variables = {
text: string;
};
apollo.mutation<Mutation, Variables>({
mutation,
variables: { } // TypeScript will warn you that `text` prop is required
}).subscribe();
apollo.mutation<Mutation, Variables>({
mutation,
variables: { text: 'Release Apollo' } // TypeScript gives a green light
}).subscribe(); |
Hi. I know this is an impossible question but how far from production ready to you think this is? I currently have a meteor/ionic app that I'm trying to port off meteor (the meteor/angular integration is too painful) and Apollo seems like a great alternative, but only if it integrates with Angular. This project seems like the perfect solution. Thanks |
@jakobwilkenson I've been testing it for roughly a week now, and the issue i had above turned out to have nothing to do with this lib, but rather my backend. I'd say its very mature, I've had very little issues with it, mainly just documentation missing but @kamilkisiela is very good at answering on Slack and has been a tremendous help to me. |
@Epenance Thanks. I've started playing around with it and I got the stackblitz example working with no problem but as soon as I add it to an ionic project it stops working. When I call query/watchquery it doesn't even make a server request. I'll try to debug it and ping @kamilkisiela if I get stuck |
I'm finishing an ApolloCache that is based on |
@jakobwilkenson I think the only part of the API that could be change in near future is the way we use headers in When? I would say, it would be nice to release it as RC before AngularConnect or right after the event but I can't promise that. This applies to |
@kamilkisiela Sounds good. I think I'll go forward and start porting my project then. Thanks! |
@kamilkisiela what are the benefits of using an ngrx based ApolloCache vs the standard in memory ApolloCache? |
Get to know the new API:
Let me know what you think.
It's the right time to make suggestions, share ideas etc.
Latest (31.10.2017):
apollo-angular@1.0.0-beta.2
apollo-angular-link-http@1.0.0-beta.5
You can play with it (31.10.2017):
https://stackblitz.com/edit/simple-apollo-angular-example
NativeScript app:
https://github.com/kamilkisiela/apollo-angular-nativescript
SSR + Store Rehydration:
https://github.com/kamilkisiela/apollo-angular-ssr
Apollo as State Manager
https://stackblitz.com/edit/apollo-angular-state