More build fixes

This commit is contained in:
Darren Clarke 2023-05-26 08:27:16 +00:00
parent 8fabcbaba2
commit 67b9b3e20a
11 changed files with 34 additions and 53 deletions

View file

@ -1,4 +1,3 @@
// @ts-nocheck
import { writeFileSync } from "node:fs";
import {
getIntrospectionQuery,
@ -27,7 +26,7 @@ export const exportGraphqlSchema = async (): Promise<void> => {
getPostGraphileOptions()
)) as unknown as GraphQLSchema;
const sorted = lexicographicSortSchema(schema);
const json = graphqlSync(schema, getIntrospectionQuery());
const json = graphqlSync({ schema, source: getIntrospectionQuery() });
writeFileSync(exportSchema, printSchema(sorted));
writeFileSync(exportJson, JSON.stringify(json));