src/App.js
src/screens/Register/Register.js
Its mutation can be found under src/apollo/server.js
with constant createUser
src/screens/Login/Login.js
Its mutation can be found under src/apollo/server.js
with constant login
src/components/ForgotPassword
Its mutation can be found under src/apollo/server.js
with constant forgotPassword
src/screens/Menu/Menu.js
Its query can be found under src/apollo/server.js
with constant categories
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
apollo
is divided into two main files server.js
and client.js
The first file is used to interact with the api server while the second is used for internal application level state management. Constants foods
and getCartItems
is a query while foodItem
is a fragment. foods
is queried with the selected category in the previous screen. If a user clicks add button inside the MenuItems screen foodItem
fragment 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.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
foodItems
and getCartItems
have been described above like
is a mutation which adds it to like food with parameter food id.src/screens/Cart/Cart.js
It has Apollo constants of getCartItems
and getProfile
. getProfile
is located at src/apollo/client.js
getProfile
is a type of query that gets user details name, email, phone, location and picture.getProfile
is used to get the user delivery location.src/screens/Payment/Payment.js
It has Apollo constants placeOrder
and getCartItems
. placeOrder
is located at src/apollo/server.js
Its a mutation.placeOrder
send the details to the server with item delivery address payment status and user profile.src/screens/MyOrders/MyOrders.js
It has Apollo constant of myOrders
located at src/apollo/server.js
its of type querysrc/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
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. src/screens/Notifications/Notifications.js
It has Apollo constants of getNotifications
its of type query located in src/apollo/client.js
getNotifications
gets all the notification that the user has notification are generated when the order status is changed from admin panel.src/screens/OrderDetail/OrderDetail.js
It has Apollo constants of orderItem
its of type fragment located in src/apollo/client.js
orderItem
has all the details for item as well as the status of the order based on the status the timeline is rendered dynamically