Result: Everything is set up to load the subsequent view based on whether or not the user has authenticated. The tutorial screen will appear initially if the user has not authenticated; else, the menu screen will appear.
Location: The UI can be found under src/screens/Login/Login.js Its mutation can be found under src/apollo/server.js with constant login
Working: Logins User using Google, Facebook or Manual Registration. A separate component for ForgotPassword is also present its component can be found src/components/ForgotPassword Its mutation can be found under src/apollo/server.js with constant forgotPassword
Result: Logins User with validation. If a user uses forgotPassword an email will be sent to him with reset link for changing his/her password.
Location: The UI can be found under src/screens/MenuItems/MenuItems.js Its mutations and queries can be found under src/apollo/server.js with constant foods and src/apollo/client.js with constants foodItem and getCartItems
Working: Apollo has two primary file servers.and client in js.js While the second file is used for internal application level state management, the first file is utilized to communicate with the api server. While foodItem is a fragment, the queries constants foods and getCartItems are queries.
Result: foods is queried with the selected category in the previous screen. If a user clicks add button inside the MenuItems screen foodItemfragment is executed which also updated query getCartItems which updated the quantity inside cart item as well as the adds the food item if it exists previously will only update its quantity.
Location: The UI can be found under src/screens/ItemDetail/ItemDetail.js Its mutations and queries can be found under src/apollo/server.js with constant like and src/apollo/server.js with constant foodItems and getCartItems
Working: Constants foodItems and getCartItems have been described above like is a mutation which adds it to like food with parameter food id.
Location: The UI can be found under src/screens/Payment/Payment.js It has Apollo constants placeOrder and getCartItems . placeOrder is located at src/apollo/server.js Its a mutation.
Working: Constant placeOrder send the details to the server with item delivery address payment status and user profile.
Result: The user chooses between using Stripe or Paypal to pay. If the Cash on Delivery option is chosen, no payment is made and the payment status is still pending. From the admin panel, its status can be modified. The user is also given access to the order details through email.
Location: The UI can be found under src/screens/Settings/Settings.js It has Apollo constants of updateUser , uploadPicture , profile and getProfile . Constants updateUser , uploadPicture and profile are located in src/apollo/server.js while constant getProfile is located at src/apollo/client.js
Working: updateUser is of type mutation where the user information is updated. uploadPicture is of type mutation where the users profile pic is updated on server. profile is of type query where the user profile is queried.
Result: User profile is updated with image uploaded. All the fields in settings are required to place order.