From 5dda76e915c7295f0a4262026c270d8aa5315a14 Mon Sep 17 00:00:00 2001 From: Austin Musiku <47279609+MusikuAustin@users.noreply.github.com> Date: Mon, 28 Aug 2023 06:15:58 +0300 Subject: [PATCH] Fix: Fixed broken schema imports --- src/@types/graphql.d.ts | 6 ++++++ tsconfig.json | 30 ++++++++++++++++-------------- 2 files changed, 22 insertions(+), 14 deletions(-) create mode 100644 src/@types/graphql.d.ts diff --git a/src/@types/graphql.d.ts b/src/@types/graphql.d.ts new file mode 100644 index 0000000..826eebf --- /dev/null +++ b/src/@types/graphql.d.ts @@ -0,0 +1,6 @@ +declare module '*.graphql' { + import { DocumentNode } from 'graphql' + const Schema: DocumentNode + + export = Schema +} diff --git a/tsconfig.json b/tsconfig.json index c004f58..53bdf04 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,15 +1,17 @@ { - "compilerOptions": { - "outDir": "dist", - "target": "ES2020", - "module": "CommonJS", - "esModuleInterop": true, - "moduleResolution": "node", - "baseUrl": ".", - "paths": { - "@/*": ["src/*"] - }, - }, - "include": ["src/**/*"], - "exclude": ["node_modules"], -} \ No newline at end of file + "compilerOptions": { + "outDir": "dist", + "target": "ES2020", + "module": "CommonJS", + "esModuleInterop": true, + "moduleResolution": "node", + "baseUrl": ".", + "paths": { + "@/*": ["src/*"] + }, + "typeRoots": ["./node_modules/@types", "./src/@types"] + }, + "files": ["src/@types/graphql.d.ts"], + "include": ["src/**/*"], + "exclude": ["node_modules"] +}