Enjoying my videos? Sign up for more content here: https://www.coopercodes.com/
Interested in a 1:1 Mentorship with me? Jumpstart your career at https://www.rebrand.ly/coopercodesmen...
TS Config: https://pastebin.com/9W8NKDvT
In this video I go how to create GraphQL Errors in Apollo Server V4. We build a basic books GraphQL API for Apollo Server V4 and then create GraphQL Errors for certain causes such as no books existing in database. Error handling is an incredibly important part of API development, and it is essential for a developer to learn how to create detailed errors for their API end users. This is a TypeScript tutorial so I also show how to implement a TypeScript Apollo Server.
Final Code: https://github.com/coopercodes/Apollo...
Buying stuff through my Amazon link supports the channel! https://amzn.to/3hK5gd0
0:00 Intro
0:50 TypeScript setup
2:32 Building typeDefs and resolvers
5:45 Apollo Server setup
7:24 getBooksByAuthor code
8:24 Create GraphQL error
10:20 getBookByID code with error handling
12:06 Outro / thanks for watching!