initial commit

This commit is contained in:
2024-12-21 16:44:53 -08:00
commit f9bae7dc07
16 changed files with 7309 additions and 0 deletions

30
src/index.ts Normal file
View File

@@ -0,0 +1,30 @@
import { readFileSync } from "fs";
import { ApolloServer } from "@apollo/server";
import { startStandaloneServer } from "@apollo/server/standalone";
import { resolvers } from "./resolvers";
const typeDefs = readFileSync("./schema.graphql", "utf8");
interface ServerContext {
}
async function main() {
const server = new ApolloServer<ServerContext>({
typeDefs,
resolvers
});
const { url } = await startStandaloneServer(server, {
listen: {
port: 4000,
},
context: async ({ req, res }) => {
return {}
},
});
console.log(`Server ready at: ${url}`);
}
main();