MCPcopy Index your code
hub / github.com/cloudgraphdev/cli / push

Method push

src/storage/dgraph/index.ts:154–179  ·  view source on GitHub ↗

* Add Service Mutation to axiosPromises Array

(data: GraphQLInputData)

Source from the content-addressed store, hash-verified

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

Callers 12

getTextFunction · 0.80
getConnectedEntityFunction · 0.80
runMethod · 0.80
addFunction · 0.80
removeFunction · 0.80
runMethod · 0.80
pushDataMethod · 0.80
pushDataMethod · 0.80
printMethod · 0.80

Calls 2

generateAxiosRequestMethod · 0.80

Tested by

no test coverage detected