|
@@ -61,8 +61,7 @@ function getGql(endpoint) {
|
|
|
|
|
|
const gql = getGql('http://hipstagram.node.ed.asmer.org.ua/graphql')
|
|
|
|
|
|
-
|
|
|
-
|
|
|
+// запрос на поиск конкретного поста
|
|
|
export const actionFindPostOne = _id => actionPromise('PostFindOne', gql(`query OnePostFind ($postOne: String){
|
|
|
PostFindOne (query: $postOne) {
|
|
|
_id createdAt title text likesCount
|
|
@@ -91,7 +90,7 @@ export const actionFindPostOne = _id => actionPromise('PostFindOne', gql(`query
|
|
|
postOne: JSON.stringify([{ _id }])
|
|
|
}))
|
|
|
|
|
|
-
|
|
|
+// запрос на поиск конкретного поста
|
|
|
export const actionFindUserOne = _id => actionPromise('UserFindOne', gql(`query OneUserFind ($userOne: String) {
|
|
|
UserFindOne(query: $userOne) {
|
|
|
_id createdAt login nick
|
|
@@ -107,4 +106,5 @@ export const actionFindUserOne = _id => actionPromise('UserFindOne', gql(`query
|
|
|
}
|
|
|
}`, {
|
|
|
userOne: JSON.stringify([{ _id }])
|
|
|
-}))
|
|
|
+}))
|
|
|
+
|