We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a5b1ce6 commit ed3363cCopy full SHA for ed3363c
src/index.js
@@ -85,3 +85,34 @@ client
85
})
86
// log error when there is no next page
87
.catch(console.log);
88
+
89
+const ADD_STAR = gql`
90
+ mutation AddStar($repositoryId: ID!) {
91
+ addStar(input: { starrableId: $repositoryId }) {
92
+ starrable {
93
+ id
94
+ viewerHasStarred
95
+ }
96
97
98
+`;
99
100
+const REMOVE_STAR = gql`
101
+ mutation RemoveStar($repositoryId: ID!) {
102
+ removeStar(input: { starrableId: $repositoryId }) {
103
104
105
106
107
108
109
110
111
+client
112
+ .mutate({
113
+ mutation: ADD_STAR,
114
+ variables: {
115
+ repositoryId: 'MDEwOlJlcG9zaXRvcnk2MzM1MjkwNw==',
116
+ },
117
+ })
118
+ .then(console.log);
0 commit comments