Iam using grapqhl-codegen to convert my queries into injectable Services, Everything works like a charm, besides, I cannot updateQuerys anymore, since I only have services and I cannot pass the service into the updatesQuerys array. I want the userGql service to refetch the data, not use the cache:
loginAttempt() {
const data = this.loginForm.value;
this.loginGql
.mutate({ data }, {updateQueries: [CANT ADD SERVICE HERE]})
.pipe(
pluck("data", "login"),
switchMap(async (token: string) => {
await this.storage.setToken(token);
return this.userGql.fetch().toPromise();
})
)
.subscribe((res) => console.log("res: ", res));
}```