@evenicanpm/admin-graphql-codegen 1.1.0 → 1.2.0

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/codegen.ts CHANGED
@@ -1,27 +1,27 @@
1
1
  import type { CodegenConfig } from "@graphql-codegen/cli";
2
2
 
3
3
  const config: CodegenConfig = {
4
- schema: "https://api.e4.local/graphql",
5
- documents: [
6
- "./documents/**/*.ts",
7
- "../admin-integrate/documents/**/*.ts",
8
- "!./documents/core/**",
9
- "!./documents/base/**",
10
- ],
11
- generates: {
12
- "./index.ts": {
13
- plugins: [
14
- "typescript",
15
- "typescript-operations",
16
- "typescript-graphql-request",
17
- ],
18
- config: {
19
- preset: "client",
20
- rawRequest: true,
21
- documentMode: "documentNode",
22
- },
23
- },
24
- },
4
+ schema: "https://api.e4.local/graphql",
5
+ documents: [
6
+ "./documents/**/*.ts",
7
+ "../admin-integrate/documents/**/*.ts",
8
+ "!./documents/core/**",
9
+ "!./documents/base/**",
10
+ ],
11
+ generates: {
12
+ "./index.ts": {
13
+ plugins: [
14
+ "typescript",
15
+ "typescript-operations",
16
+ "typescript-graphql-request",
17
+ ],
18
+ config: {
19
+ preset: "client",
20
+ rawRequest: true,
21
+ documentMode: "documentNode",
22
+ },
23
+ },
24
+ },
25
25
  };
26
26
 
27
27
  export default config;
@@ -0,0 +1,13 @@
1
+ import gql from "graphql-tag";
2
+
3
+ const GENERATE_SITEMAP = gql`
4
+ mutation GenerateSitemap($generateSitemapInput: GenerateSitemapInput!) {
5
+ generateSitemap(input: $generateSitemapInput) {
6
+ message
7
+ code
8
+ generationType
9
+ id
10
+ source
11
+ }
12
+ }
13
+ `;
@@ -0,0 +1,12 @@
1
+ import gql from "graphql-tag";
2
+
3
+ const SITEMAP_SCHEDULE = gql`
4
+ query SitemapSchedule($sitemapScheduleInput: SitemapScheduleInput!) {
5
+ sitemapSchedule(input: $sitemapScheduleInput) {
6
+ lastRunAt
7
+ nextRunAt
8
+ schedule
9
+ source
10
+ }
11
+ }
12
+ `;
@@ -0,0 +1,14 @@
1
+ import gql from "graphql-tag";
2
+
3
+ const UPDATE_SITEMAP_SCHEDULE = gql`
4
+ mutation UpdateSitemapSchedule(
5
+ $updateSitemapScheduleInput: UpdateSitemapScheduleInput!
6
+ ) {
7
+ updateSitemapSchedule(input: $updateSitemapScheduleInput) {
8
+ code
9
+ message
10
+ source
11
+ success
12
+ }
13
+ }
14
+ `;
package/package.json CHANGED
@@ -1,22 +1,22 @@
1
1
  {
2
- "name": "@evenicanpm/admin-graphql-codegen",
3
- "version": "1.1.0",
4
- "description": "",
5
- "main": "index.js",
6
- "author": "",
7
- "license": "ISC",
8
- "gitHead": "0c9180f24435b0361dfc05ccba4a1f0e7ad19a7a",
9
- "scripts": {
10
- "test": "echo \"Error: no test specified\" && exit 1",
11
- "codegen:insecure": "NODE_TLS_REJECT_UNAUTHORIZED=0 npm run codegen",
12
- "codegen": "graphql-codegen"
13
- },
14
- "dependencies": {
15
- "@graphql-codegen/cli": "^5.0.5",
16
- "@graphql-codegen/typescript": "^4.1.6",
17
- "@graphql-codegen/typescript-graphql-request": "^6.2.0",
18
- "glob": "^11.0.1",
19
- "graphql": "^16.10.0",
20
- "graphql-request": "^7.1.2"
21
- }
2
+ "name": "@evenicanpm/admin-graphql-codegen",
3
+ "version": "1.2.0",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "author": "",
7
+ "license": "ISC",
8
+ "gitHead": "6a95e9f84f48a7e1e96bfdf4ee1a766a7d8808b6",
9
+ "scripts": {
10
+ "test": "echo \"Error: no test specified\" && exit 1",
11
+ "codegen:insecure": "NODE_TLS_REJECT_UNAUTHORIZED=0 npm run codegen",
12
+ "codegen": "graphql-codegen"
13
+ },
14
+ "dependencies": {
15
+ "@graphql-codegen/cli": "^5.0.5",
16
+ "@graphql-codegen/typescript": "^4.1.6",
17
+ "@graphql-codegen/typescript-graphql-request": "^6.2.0",
18
+ "glob": "^11.0.1",
19
+ "graphql": "^16.10.0",
20
+ "graphql-request": "^7.1.2"
21
+ }
22
22
  }
package/test.js CHANGED
@@ -3,13 +3,13 @@ import { parse } from "graphql";
3
3
  import { glob } from "glob";
4
4
 
5
5
  const main = async () => {
6
- const files = await glob("./documents/**/*.ts");
7
- return files.map((f) => {
8
- console.log(f);
9
- const js = readFileSync(f, "utf8");
10
- eval(js);
11
- //const gql = parse(js);
12
- });
6
+ const files = await glob("./documents/**/*.ts");
7
+ return files.map((f) => {
8
+ console.log(f);
9
+ const js = readFileSync(f, "utf8");
10
+ eval(js);
11
+ //const gql = parse(js);
12
+ });
13
13
  };
14
14
 
15
15
  main();