Since authorized subscriptions should work by now, following a few tickets #504, #1021, #1766, #1810.
I don't understand how I can use that subscriptions now with the generated JavaScript client. How can I pass the owner to the subscription?
type Todo @model @auth(rules: [{allow: owner}]){
id: ID!
title: String!
owner: String
}
this.apiService.OnCreateTodoListener.subscribe((evt) => {
console.log("added: ", evt);
});
Are you currently working on this ticket? I can try to help with a pull request and change the line https://github.com/aws-amplify/amplify-cli/blob/a684439ad3367a8df6377c0b7fd897c7c0229a9c/packages/amplify-graphql-types-generator/src/angular/index.ts#L124
Hey @mattmeye, a PR would be welcome!
Hi @mattmeye is there any bugfix or work around yet? Thx
You can use this workaround for the time being adapting it for your current use case
https://gist.github.com/gsans/aeffbae886add35b669c84f5e5b3fa69#file-postcomments-component-ts-L27-L43
Hi there, any update ?
@nikhname ?
Any update?
Any update or is this another dead end?
HI,
Same issue here.
Any update ?
Most helpful comment
You can use this workaround for the time being adapting it for your current use case
https://gist.github.com/gsans/aeffbae886add35b669c84f5e5b3fa69#file-postcomments-component-ts-L27-L43