@infrab4a/connect 4.0.0-beta.7 → 4.0.0-beta.8
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.
|
@@ -10,7 +10,6 @@ import axios from 'axios';
|
|
|
10
10
|
import { collection, getDoc, doc, where, orderBy, getDocs, query, startAfter, startAt, limit, addDoc, setDoc, deleteField, arrayUnion, arrayRemove, deleteDoc, Timestamp } from 'firebase/firestore';
|
|
11
11
|
import { signInWithEmailAndPassword, signInWithPopup, GoogleAuthProvider, signInAnonymously, sendPasswordResetEmail, createUserWithEmailAndPassword, sendEmailVerification } from 'firebase/auth';
|
|
12
12
|
import { mutation, query as query$1 } from 'gql-query-builder';
|
|
13
|
-
import fetch from 'node-fetch';
|
|
14
13
|
|
|
15
14
|
class BaseModel {
|
|
16
15
|
get identifier() {
|
|
@@ -2312,12 +2311,10 @@ const withHasuraGraphQL = (MixinBase) => {
|
|
|
2312
2311
|
}
|
|
2313
2312
|
async fetch(params) {
|
|
2314
2313
|
const headers = this.headers;
|
|
2315
|
-
const response = await
|
|
2316
|
-
method: 'POST',
|
|
2317
|
-
body: JSON.stringify(params),
|
|
2314
|
+
const response = await axios.post(`${this.endpoint}`, params, {
|
|
2318
2315
|
headers,
|
|
2319
2316
|
});
|
|
2320
|
-
const result = await response.
|
|
2317
|
+
const result = await response.data;
|
|
2321
2318
|
if (!isNil(result.errors))
|
|
2322
2319
|
throw new Error(JSON.stringify(result.errors));
|
|
2323
2320
|
return result.data;
|