@devticon-os/graphql-codegen-axios 0.5.4 → 0.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/templates/helpers.ts +2 -1
package/package.json
CHANGED
package/templates/helpers.ts
CHANGED
|
@@ -117,7 +117,8 @@ const execute = (
|
|
|
117
117
|
client.post('', body, config).then(({ data }: AxiosResponse<GraphqlResponse<any>>) => {
|
|
118
118
|
const errors = data.errors;
|
|
119
119
|
if (errors && errors.length > 0) {
|
|
120
|
-
|
|
120
|
+
const queryName = body.query.replace(/\s+/g, ' ').split(/[({]/g)[0];
|
|
121
|
+
throw new GraphqlError(`GraphQL '${queryName}' failed`, errors);
|
|
121
122
|
}
|
|
122
123
|
let d = data.data;
|
|
123
124
|
for (let func of functions) {
|