diff --git a/backend/src/schema/resolvers/shout.spec.js b/backend/src/schema/resolvers/shout.spec.js index a9991dfd9..294a28a76 100644 --- a/backend/src/schema/resolvers/shout.spec.js +++ b/backend/src/schema/resolvers/shout.spec.js @@ -10,12 +10,12 @@ const driver = getDriver() const mutationShoutPost = gql` mutation ($id: ID!) { - shout(id: $id, type: "Post") + shout(id: $id, type: Post) } ` const mutationUnshoutPost = gql` mutation ($id: ID!) { - unshout(id: $id, type: "Post") + unshout(id: $id, type: Post) } ` const queryPost = gql` diff --git a/backend/src/schema/types/schema.gql b/backend/src/schema/types/schema.gql index d59f696b2..9e2d00bca 100644 --- a/backend/src/schema/types/schema.gql +++ b/backend/src/schema/types/schema.gql @@ -1,19 +1,16 @@ -type Embed { - type: String - title: String - author: String - publisher: String - date: String - description: String - url: String - image: String - audio: String - video: String - lang: String - html: String - sources: [String] +enum ShoutTypeEnum { + Post } -type Query { - embed(url: String!): Embed +type Reward { + id: ID! + user: User @relation(name: "REWARDED", direction: "IN") + rewarderId: ID + createdAt: String + badge: Badge @relation(name: "REWARDED", direction: "OUT") } + +type SharedInboxEndpoint { + id: ID! + uri: String +} \ No newline at end of file diff --git a/backend/src/schema/types/type/Post.gql b/backend/src/schema/types/type/Post.gql index cd9fcb914..3ed55c270 100644 --- a/backend/src/schema/types/type/Post.gql +++ b/backend/src/schema/types/type/Post.gql @@ -208,8 +208,10 @@ type Mutation { unpinPost(id: ID!): Post markTeaserAsViewed(id: ID!): Post - shout(id: ID!, type: String!): Boolean - unshout(id: ID!, type: String!): Boolean + # Shout the given Type and ID + shout(id: ID!, type: ShoutTypeEnum): Boolean! + # Unshout the given Type and ID + unshout(id: ID!, type: ShoutTypeEnum): Boolean! } type Query { diff --git a/backend/src/schema/types/type/User.gql b/backend/src/schema/types/type/User.gql index 4285e4443..f406e4e45 100644 --- a/backend/src/schema/types/type/User.gql +++ b/backend/src/schema/types/type/User.gql @@ -225,9 +225,10 @@ type Mutation { saveCategorySettings(activeCategories: [String]): Boolean - requestPasswordReset(email: String!): Boolean - resetPassword(nonce: String!, email: String!, newPassword: String!): Boolean - changePassword(oldPassword: String!, newPassword: String!): String + requestPasswordReset(email: String!): Boolean! + resetPassword(email: String!, nonce: String!, newPassword: String!): Boolean! + changePassword(oldPassword: String!, newPassword: String!): String! - login(email: String!, password: String!): String + # Get a JWT Token for the given Email and password + login(email: String!, password: String!): String! }