Skip to content

High performance apollo-express server for both react native apps

Notifications You must be signed in to change notification settings

darkbluein/apollo-server

Repository files navigation

Configure server

Setup env variables after creating .env file in the root directory. Following env variables are necessary for fully functioning server. More to be added accordingly

PORT=5000

REDIS_HOST=
REDIS_PORT=6379

NODE_ENV=

MONGODB_CONNECTION_STRING=

TWILIO_ACCOUNT_SID=
TWILIO_AUTH_TOKEN=
TWILIO_MESSAGING_SID=

TOKEN_SECRET=
REFRESH_TOKEN_SECRET=

GOOGLE_MAPS_APIKEY=

Types

Queries

// user
getFeed;
getUser;
twoFactorAuth;
checkAuth;

// store
getStore;
getConfirmation;

// order
getOrder;
getOrders;
getDeliveryTimes; //FIXME: Unnecessary query

Mutations

// user
login;
register;
updateAddress;
deleteAddress;
editProfile;
deleteAccount;

// store
addAccount;
editStore;
addToInventory;

// order
createOrder;
alterOrderState;
alterDeliveryState;

Subscriptions

// user
userUpdate;

// store
storeUpdate;
inventoryUpdate;
accountUpdate;

// order
orderUpdate;