diff --git a/apollo-gateway/graphql/adapters/CommentsService.js b/apollo-gateway/graphql/adapters/CommentsService.js
new file mode 100644
index 0000000000000000000000000000000000000000..a89b8fda3ea147837c645bc44674a1a18ac9ca67
--- /dev/null
+++ b/apollo-gateway/graphql/adapters/CommentsService.js
@@ -0,0 +1,28 @@
+import axios from 'axios';
+
+const COMMENTS_SERVICE_URI = "http://localhost:5003";
+
+export default class PostsService {
+ static async fetchAllPostComments({ postId }) {
+ const { data } = await axios.get(`${COMMENTS_SERVICE_URI}/comments/post/${postId}`);
+ return data;
+ }
+
+ static async getCommentById({ id }) {
+ const { data } = await axios.get(`${COMMENTS_SERVICE_URI}/comments/${id}`);
+ return data;
+ }
+
+ static async deleteCommentById({ id }) {
+ await axios.delete(`${COMMENTS_SERVICE_URI}/comments/${id}`);
+ }
+
+ static async createComment(comment) {
+ const { data } = await axios.post(`${COMMENTS_SERVICE_URI}/comments/`, comment);
+ return data;
+ }
+
+ static async deleteAllPostComments({ postId }) {
+ await axios.delete(`${COMMENTS_SERVICE_URI}/comments/post/${postId}`);
+ }
+}
\ No newline at end of file
diff --git a/apollo-gateway/graphql/adapters/PostsService.js b/apollo-gateway/graphql/adapters/PostsService.js
new file mode 100644
index 0000000000000000000000000000000000000000..d0df8d64355b8250f3d816b9208cd62214c422ca
--- /dev/null
+++ b/apollo-gateway/graphql/adapters/PostsService.js
@@ -0,0 +1,38 @@
+import axios from 'axios';
+
+const POSTS_SERVICE_URI = "http://localhost:5002";
+
+export default class PostsService {
+ static async fetchAllPosts() {
+ const { data } = await axios.get(`${POSTS_SERVICE_URI}/posts/`);
+ return data;
+ }
+
+ static async getPostById({ id }) {
+ const { data } = await axios.get(`${POSTS_SERVICE_URI}/posts/${id}`);
+ return data;
+ }
+
+ static async createPost(post) {
+ const { data } = await axios.post(`${POSTS_SERVICE_URI}/posts/`, post);
+ return data;
+ }
+
+ static async deletePost({ id }) {
+ await axios.delete(`${POSTS_SERVICE_URI}/posts/${id}`);
+ }
+
+ static async likePost({ postId, userId }) {
+ await axios.patch(`${POSTS_SERVICE_URI}/posts/${postId}/like/${userId}`)
+ }
+
+ static async addCommentId({ commentId, postId }) {
+ const { data } = await axios.patch(`${POSTS_SERVICE_URI}/posts/${postId}/comment/${commentId}`);
+ return data;
+ }
+
+ static async deleteCommentId({ commentId, postId }) {
+ const { data } = await axios.delete(`${POSTS_SERVICE_URI}/posts/${postId}/comment/${commentId}`);
+ return data;
+ }
+}
\ No newline at end of file
diff --git a/apollo-gateway/graphql/adapters/UsersService.js b/apollo-gateway/graphql/adapters/UsersService.js
new file mode 100644
index 0000000000000000000000000000000000000000..aca9cd3afb39376b4e252539fc4dcba5d1ee7326
--- /dev/null
+++ b/apollo-gateway/graphql/adapters/UsersService.js
@@ -0,0 +1,32 @@
+import axios from 'axios';
+
+const USERS_SERVICE_URI = "http://localhost:5001/user";
+
+export default class UsersService {
+ static async signup({ name, email, password }) {
+ const { data } = await axios.post(`${USERS_SERVICE_URI}/signup`, {
+ name,
+ email,
+ password
+ });
+ return data;
+ }
+
+ static async signin({ email, password }) {
+ const { data } = await axios.post(`${USERS_SERVICE_URI}/signin`, {
+ email,
+ password
+ });
+ return data;
+ }
+
+ static async checkUserEmail({ email }) {
+ const { data } = await axios.get(`${USERS_SERVICE_URI}/user/check/${email}`);
+ return data;
+ }
+
+ static async getUserById({ id }) {
+ const { data } = await axios.get(`${USERS_SERVICE_URI}/user/${id}`);
+ return data;
+ }
+}
\ No newline at end of file