Skip to content

Commit

Permalink
cleanup generate-schema
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrrt committed Dec 15, 2023
1 parent 26de00d commit 9d7dae3
Showing 1 changed file with 11 additions and 18 deletions.
29 changes: 11 additions & 18 deletions packages/cli/src/commands/generate-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,19 @@ export const generateSchemaAction = async ({
const demoConfig = require(configPath).default;

console.log(demoConfig);
// const validatedConfig = validateConfig(demoConfig);
const validatedConfig = validateConfig(demoConfig);

// if (!validatedConfig) {
// throw new Error("Invalid config");
// }
if (!validatedConfig) {
throw new Error("Invalid config");
}

// const schemas = [
// {
// id: "mgt",
// uri: "https://mgt.auth.dog/graphql",
// },
// {
// id: "authz",
// uri: "https://authz.auth.dog/graphql",
// },
// ];


// await buildSchemaIntrospection(schemas, outputPath);
try {
await buildSchemaIntrospection(validatedConfig.schemas, outputPath);
}
catch (error) {
console.error(error);
}


// console.log("Generate Schema action");
console.info("Schema generated successfully");
}

0 comments on commit 9d7dae3

Please sign in to comment.