Closed sugamkarki closed 2 years ago
uploadClicked($event: any) { let file = $event.target.files[0]; this.addPictureGQL.mutate({ picture: file }).subscribe((res) => { console.log(res); }); }
This is my code in angular. Before you say that you don't like angular, I don't either. Its for a school project.
The code works fine with postman, but I can't mutate and keeps throwing me errors.
I tried
this.addPictureGQL // @ts-ignore .mutate({ variables: { picture: file } }) .subscribe((res) => { console.log(res); }); }
But I got
Solved it!!
This is my code in angular. Before you say that you don't like angular, I don't either. Its for a school project.
The code works fine with postman, but I can't mutate and keeps throwing me errors.
I tried
But I got