disable introspection when environment is set to production

This commit is contained in:
2024-12-27 13:41:20 -08:00
parent 4b16790525
commit 7df8903762

View File

@@ -12,7 +12,8 @@ const typeDefs = readFileSync("./schema.graphqls", "utf8");
async function main() { async function main() {
const server = new ApolloServer<ServerContext>({ const server = new ApolloServer<ServerContext>({
typeDefs, typeDefs,
resolvers resolvers,
introspection: process.env.NODE_ENV !== "production",
}); });
const repository = new UnoptimizedInMemoryRepository(); const repository = new UnoptimizedInMemoryRepository();