File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ final class GraphQueries {
140140 }
141141
142142 query {
143- project(pk: \( pk) {
143+ project(pk: \( pk) ) {
144144 pk
145145 name
146146 prototypeUrl
Original file line number Diff line number Diff line change @@ -120,15 +120,15 @@ final class Marvel {
120120
121121 func graphQL( query: String , accessToken: String ) throws -> Response {
122122
123- let body : Node = [
123+ let body : JSON = [
124124 " query " : . string( query)
125125 ]
126126
127-
128127 let request = Request ( method: . post, uri: " \( apiUrl) /graphql/ " )
129- request. query = body
128+ request. body = body. makeBody ( )
130129 request. headers = [
131- " Authorization " : " Bearer \( accessToken) "
130+ " Authorization " : " Bearer \( accessToken) " ,
131+ " Content-Type " : " application/json "
132132 ]
133133 return try drop. client. respond ( to: request)
134134
You can’t perform that action at this time.
0 commit comments