Complete Email Sortierer implementation with Appwrite and Stripe integration
This commit is contained in:
72
server/node_modules/node-appwrite/dist/services/graphql.mjs
generated
vendored
Normal file
72
server/node_modules/node-appwrite/dist/services/graphql.mjs
generated
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
import { AppwriteException } from '../client.mjs';
|
||||
|
||||
// src/services/graphql.ts
|
||||
var Graphql = class {
|
||||
constructor(client) {
|
||||
this.client = client;
|
||||
}
|
||||
query(paramsOrFirst) {
|
||||
let params;
|
||||
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && "query" in paramsOrFirst) {
|
||||
params = paramsOrFirst || {};
|
||||
} else {
|
||||
params = {
|
||||
query: paramsOrFirst
|
||||
};
|
||||
}
|
||||
const query = params.query;
|
||||
if (typeof query === "undefined") {
|
||||
throw new AppwriteException('Missing required parameter: "query"');
|
||||
}
|
||||
const apiPath = "/graphql";
|
||||
const payload = {};
|
||||
if (typeof query !== "undefined") {
|
||||
payload["query"] = query;
|
||||
}
|
||||
const uri = new URL(this.client.config.endpoint + apiPath);
|
||||
const apiHeaders = {
|
||||
"x-sdk-graphql": "true",
|
||||
"content-type": "application/json"
|
||||
};
|
||||
return this.client.call(
|
||||
"post",
|
||||
uri,
|
||||
apiHeaders,
|
||||
payload
|
||||
);
|
||||
}
|
||||
mutation(paramsOrFirst) {
|
||||
let params;
|
||||
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && "query" in paramsOrFirst) {
|
||||
params = paramsOrFirst || {};
|
||||
} else {
|
||||
params = {
|
||||
query: paramsOrFirst
|
||||
};
|
||||
}
|
||||
const query = params.query;
|
||||
if (typeof query === "undefined") {
|
||||
throw new AppwriteException('Missing required parameter: "query"');
|
||||
}
|
||||
const apiPath = "/graphql/mutation";
|
||||
const payload = {};
|
||||
if (typeof query !== "undefined") {
|
||||
payload["query"] = query;
|
||||
}
|
||||
const uri = new URL(this.client.config.endpoint + apiPath);
|
||||
const apiHeaders = {
|
||||
"x-sdk-graphql": "true",
|
||||
"content-type": "application/json"
|
||||
};
|
||||
return this.client.call(
|
||||
"post",
|
||||
uri,
|
||||
apiHeaders,
|
||||
payload
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
export { Graphql };
|
||||
//# sourceMappingURL=out.js.map
|
||||
//# sourceMappingURL=graphql.mjs.map
|
||||
Reference in New Issue
Block a user