Add graphql request to back end
This commit is contained in:
@@ -4,6 +4,7 @@ import log from "electron-log/main";
|
||||
import path, { join } from "path";
|
||||
import icon from "../../resources/icon.png?asset";
|
||||
import ErrorTypeCheck from "../util/errorTypeCheck";
|
||||
import client from "./graphql/graphql-client";
|
||||
import store from "./store/store";
|
||||
|
||||
log.initialize();
|
||||
@@ -32,7 +33,7 @@ function createWindow(): void {
|
||||
},
|
||||
});
|
||||
|
||||
const template = [
|
||||
const template: Electron.MenuItemConstructorOptions[] = [
|
||||
// { role: 'appMenu' }
|
||||
...(isMac
|
||||
? [
|
||||
@@ -117,13 +118,14 @@ function createWindow(): void {
|
||||
submenu: [
|
||||
{
|
||||
label: "Learn More",
|
||||
click: async () => {
|
||||
click: async (): Promise<void> => {
|
||||
const { shell } = require("electron");
|
||||
await shell.openExternal("https://electronjs.org");
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
...(import.meta.env.DEV
|
||||
? [
|
||||
{
|
||||
@@ -148,6 +150,26 @@ function createWindow(): void {
|
||||
shell.openPath(path.dirname(store.path));
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "separator",
|
||||
},
|
||||
{
|
||||
label: "Temp Test Action - Get Token from Renderer",
|
||||
click: (): void => {
|
||||
client
|
||||
.request(
|
||||
`
|
||||
query jobs{
|
||||
jobs
|
||||
{
|
||||
id}}
|
||||
`
|
||||
)
|
||||
.then((data) => {
|
||||
log.info("Data from graffle", data);
|
||||
});
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user