* Add Service Mutation to axiosPromises Array
(data: GraphQLInputData)
| 152 | * Add Service Mutation to axiosPromises Array |
| 153 | */ |
| 154 | push(data: GraphQLInputData): void { |
| 155 | const { query, input, patch } = data |
| 156 | const queryData: GraphQLQueryData = { |
| 157 | query, |
| 158 | variables: { |
| 159 | input, |
| 160 | patch, |
| 161 | }, |
| 162 | } |
| 163 | this.axiosPromises.push(() => |
| 164 | this.generateAxiosRequest({ |
| 165 | path: '/graphql', |
| 166 | data: queryData, |
| 167 | }) |
| 168 | .then((res: ExecutionResult) => { |
| 169 | const { data: resData, errors } = res |
| 170 | processGQLExecutionResult({ |
| 171 | reqData: queryData, |
| 172 | resData, |
| 173 | errors, |
| 174 | service: data.name, |
| 175 | }) |
| 176 | }) |
| 177 | .catch(error => Promise.reject(error)) |
| 178 | ) |
| 179 | } |
| 180 | |
| 181 | /** |
| 182 | * Executes mutations sequentially into Dgraph |
no test coverage detected