added error handling, fixed authenticaton, added toaster

This commit is contained in:
lnn0q 2025-03-30 17:31:12 +03:00
parent 40c35bda13
commit b6b7cea210
18 changed files with 1327 additions and 68 deletions

View file

@ -31,7 +31,14 @@ const resolvers = {
const apollo = new ApolloServer<IdentityContext>({
typeDefs,
resolvers,
plugins: [ApolloServerPluginDrainHttpServer({ httpServer: server })]
plugins: [ApolloServerPluginDrainHttpServer({ httpServer: server })],
formatError: (formattedError, error) => {
process.stdout.write('\n```\n');
console.error(`${error}`);
process.stdout.write('\n```\n');
return formattedError;
}
});
await apollo.start();