@@ -39,9 +39,9 @@ export default class GitHubTsClient {
3939 return this . client . fetch ( this . url , {
4040 method : 'POST' ,
4141 body : JSON . stringify ( {
42- query : `mutation ($repositoyId : ID!) {
43- addStar(input : {clientMutationId : "123", starrableId : $repositoyId }){
44- starrable {
42+ query : `{
43+ addStar(input: {clientMutationId: "123", starrableId: $repositoyId}){
44+ starrable{
4545 viewerHasStarred
4646 }
4747 }
@@ -71,10 +71,10 @@ export default class GitHubTsClient {
7171 return this . client . fetch ( this . url , {
7272 method : 'POST' ,
7373 body : JSON . stringify ( {
74- query : `query {
75- viewer {
76- login,
77- bio,
74+ query : `query {
75+ viewer{
76+ login
77+ bio
7878 }
7979}
8080` ,
@@ -101,20 +101,20 @@ export default class GitHubTsClient {
101101 return this . client . fetch ( this . url , {
102102 method : 'POST' ,
103103 body : JSON . stringify ( {
104- query : `query ($type : SearchType!, $query : String!) {
105- viewer {
104+ query : `query ($type: SearchType!, $query: String!) {
105+ viewer{
106106 login
107107 }
108- search(first : 10, type : $type, query : $query){
108+ search(first: 10, type: $type, query: $query){
109109 nodes{
110110 __typename
111- ... on Issue {
112- author {
111+ ... on Issue {
112+ author{
113113 login
114114 }
115115 }
116- ... on PullRequest{
117- author {
116+ ... on PullRequest {
117+ author{
118118 login
119119 }
120120 }
@@ -147,21 +147,21 @@ export default class GitHubTsClient {
147147 return this . client . fetch ( this . url , {
148148 method : 'POST' ,
149149 body : JSON . stringify ( {
150- query : `query ($login:String!, $repoCount: Int!){
150+ query : `query ($login: String!, $repoCount: Int!) {
151151 user(login: $login){
152- login,
153- bio,
154- first : repositories(first : $repoCount){
152+ login
153+ bio
154+ first: repositories(first: $repoCount){
155155 nodes{
156- id,
157- name,
156+ id
157+ name
158158 updatedAt
159159 }
160- },
161- last : repositories(last : $repoCount){
160+ }
161+ last: repositories(last: $repoCount){
162162 nodes{
163- id,
164- name,
163+ id
164+ name
165165 updatedAt
166166 }
167167 }
0 commit comments