We quickly clean up our apollo server.
1. First we move our queries to a separate file called Query.js
2. Do the same for the mutations as well
Now we have much cleaner simple index file
Next we get the id from the verified token and then get the user of that id and add a field to it - emailVerified and mark it as true
Finally we update the User mongoose model and the graphql.schema accordingly
Become a patron - / doingiteasychannel
Follow me on Twitter / uthpala_419
#ApolloServer
Watch video Clean up and changing user state to verified - ApolloServer online without registration, duration hours minute second in high quality. This video was added by user Uthpala Heenatigala 07 March 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 766 once and liked it 17 people.