There was an error while loading. Please reload this page.
1 parent 1b35614 commit 485ef2aCopy full SHA for 485ef2a
1 file changed
packages/openneuro-server/scripts/dump-schema.ts
@@ -2,12 +2,8 @@
2
* Dump the Pothos GraphQL schema to SDL.
3
*/
4
import { writeFileSync } from "fs"
5
-import { dirname, join } from "path"
6
-import { fileURLToPath } from "url"
7
import { lexicographicSortSchema, printSchema } from "graphql/index.js"
8
import schema from "../src/graphql/schema"
9
10
-console.log("Dumping GraphQL schema to SDL...")
11
const sdl = printSchema(lexicographicSortSchema(schema))
12
-const dir = dirname(fileURLToPath(import.meta.url))
13
-writeFileSync(join(dir, "..", "schema.graphql"), sdl + "\n")
+writeFileSync("schema.graphql", sdl + "\n")
0 commit comments