Mark-Lasfar commited on
Commit
fb3f050
·
1 Parent(s): ab7f0c3

Add GraphQL

Browse files
Files changed (1) hide show
  1. graphql/schema.js +20 -0
graphql/schema.js CHANGED
@@ -1333,6 +1333,21 @@ const typeDefs = gql`
1333
  exportData: Boolean!
1334
  }
1335
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1336
  type UserSubscription {
1337
  _id: ID!
1338
  userId: User!
@@ -1663,6 +1678,9 @@ const typeDefs = gql`
1663
  message: String!
1664
  }
1665
 
 
 
 
1666
  # ============================================
1667
  # 🔹 QUERY ROOT
1668
  # ============================================
@@ -1682,6 +1700,8 @@ const typeDefs = gql`
1682
  pageSuggestions(limit: Int): [PageSuggestion!]!
1683
  profileAnalytics: ProfileAnalytics!
1684
 
 
 
1685
 
1686
  # ===== Search =====
1687
  searchUsers(query: String!, page: Int, limit: Int): SearchUsersResult!
 
1333
  exportData: Boolean!
1334
  }
1335
 
1336
+ type UserSuggestion {
1337
+ _id: ID!
1338
+ username: String!
1339
+ followersCount: Int!
1340
+ profile: SuggestionProfile!
1341
+ }
1342
+
1343
+ type SuggestionProfile {
1344
+ nickname: String
1345
+ avatar: String
1346
+ jobTitle: String
1347
+ bio: String
1348
+ }
1349
+
1350
+
1351
  type UserSubscription {
1352
  _id: ID!
1353
  userId: User!
 
1678
  message: String!
1679
  }
1680
 
1681
+
1682
+
1683
+
1684
  # ============================================
1685
  # 🔹 QUERY ROOT
1686
  # ============================================
 
1700
  pageSuggestions(limit: Int): [PageSuggestion!]!
1701
  profileAnalytics: ProfileAnalytics!
1702
 
1703
+ userSuggestions(limit: Int): [UserSuggestion!]!
1704
+
1705
 
1706
  # ===== Search =====
1707
  searchUsers(query: String!, page: Int, limit: Int): SearchUsersResult!