Apollo Server - Registering users and a bit of Refactoring

Опубликовано: 08 Февраль 2020
на канале: Uthpala Heenatigala
1,002
19

In this lesson we do a bit of refactoring. Firstly we move the validation code of joi from the resolver to the character model.
Next we move the GraphQL schema ( the typeDefs ) to its own file - schema.graphql

Then we start by creating the User type and UserInput input type in our schema. We also learn about input types in graphql.
Next we create User mongoose model and add the fields and the validation using Joi.
Finally we create the signup resolver - use bcrypt to hash the user password
Use jsonwebtoken package to create the authentication token.

Please subscribe to the channel it motivates me a lot :)

Become a patron -   / doingiteasychannel  
Follow me on Twitter   / uthpala_419  


#ApolloServer #GraphQL #doingiteasychannel


На этой странице сайта вы можете посмотреть видео онлайн Apollo Server - Registering users and a bit of Refactoring длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Uthpala Heenatigala 08 Февраль 2020, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 1,002 раз и оно понравилось 19 зрителям. Приятного просмотра!