Skip to content

Commit 6109442

Browse files
committed
removing jsontographQLQuery module use
1 parent dbb7de2 commit 6109442

File tree

3 files changed

+21
-23
lines changed

3 files changed

+21
-23
lines changed

src/main.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { loadFull } from "tsparticles";
88
import Vue3Sanitize from "vue-3-sanitize";
99
import App from "./App/App.vue";
1010
import router from "./router";
11-
import { jsonToGraphQLQuery } from "json-to-graphql-query";
1211

1312
const pinia = createPinia();
1413

@@ -21,7 +20,6 @@ const app = createApp(App)
2120
await loadFull(engine);
2221
},
2322
})
24-
.use(Vue3Sanitize)
25-
.use(jsonToGraphQLQuery);
23+
.use(Vue3Sanitize);
2624

2725
app.mount("#app");

src/stores/advancedSearch.js

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { jsonToGraphQLQuery } from "json-to-graphql-query";
21
import { defineStore } from "pinia";
32
import GraphClient from "@/lib/GraphClient/GraphClient.js";
43
import advancedQuery from "@/lib/GraphClient/queries/getAdvancedSearch.json";
@@ -23,25 +22,29 @@ export const useAdvancedSearchStore = defineStore("advancedSearch", {
2322
this.fairassistID,
2423
filterSelected,
2524
);
26-
let whereObjData = {
27-
operator: "_and",
28-
fields: [],
29-
};
30-
//Below is the format required for jsonToGraphQlQuery
31-
let parentQuery = {};
32-
parentQuery["query"] = {};
33-
parentQuery["__args"] = whereObjData;
34-
parentQuery.query["__args"] = {
35-
where: whereObjData,
36-
};
37-
let graphqlQuery = jsonToGraphQLQuery(parentQuery, { pretty: true });
38-
graphqlQuery = graphqlQuery.replace("query", "").trim();
39-
graphqlQuery = graphqlQuery.match(/^\((.*)\)$/)[1];
25+
// let whereObjData = {
26+
// operator: "_and",
27+
// fields: [],
28+
// };
29+
//
30+
// //Below is the format required for jsonToGraphQlQuery
31+
// let parentQuery = {};
32+
// parentQuery["query"] = {};
33+
// parentQuery["__args"] = whereObjData;
34+
// parentQuery.query["__args"] = {
35+
// where: whereObjData,
36+
// };
37+
// let graphqlQuery = jsonToGraphQLQuery(parentQuery, { pretty: true });
38+
//
39+
// graphqlQuery = graphqlQuery.replace("query", "").trim();
40+
// graphqlQuery = graphqlQuery.match(/^\((.*)\)$/)[1];
41+
//
42+
// let whereObj = graphqlQuery.replace("where:", "");
4043

41-
let whereObj = graphqlQuery.replace("where:", "");
44+
let whereObJQuery = '{operator: "_and", fields: []}';
4245
ADVANCED_TAGS.queryParam = {
4346
id: searchIds,
44-
where: whereObj,
47+
where: whereObJQuery,
4548
};
4649
try {
4750
let response = await CLIENT.executeQuery(ADVANCED_TAGS);

vite.config.mjs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,6 @@ export default defineConfig({
6969
dir: "dist",
7070
format: "es",
7171
},
72-
external: [
73-
"json-to-graphql-query",
74-
],
7572
}
7673
}
7774
});

0 commit comments

Comments
 (0)