fix several queries to have the right types

This commit is contained in:
Ulf Gebhardt 2023-05-23 12:50:45 +02:00
parent 238e566954
commit 951a35df1e
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9
4 changed files with 6 additions and 8 deletions

View File

@ -10,12 +10,12 @@ const driver = getDriver()
const mutationShoutPost = gql` const mutationShoutPost = gql`
mutation ($id: ID!) { mutation ($id: ID!) {
shout(id: $id, type: Post) shout(id: $id, type: "Post")
} }
` `
const mutationUnshoutPost = gql` const mutationUnshoutPost = gql`
mutation ($id: ID!) { mutation ($id: ID!) {
unshout(id: $id, type: Post) unshout(id: $id, type: "Post")
} }
` `
const queryPost = gql` const queryPost = gql`

View File

@ -270,7 +270,6 @@ describe('login', () => {
it('responds with "Incorrect email address or password."', async () => { it('responds with "Incorrect email address or password."', async () => {
await respondsWith({ await respondsWith({
data: null,
errors: [{ message: 'Incorrect email address or password.' }], errors: [{ message: 'Incorrect email address or password.' }],
}) })
}) })
@ -283,7 +282,6 @@ describe('login', () => {
it('responds with "Your account has been disabled."', async () => { it('responds with "Your account has been disabled."', async () => {
await respondsWith({ await respondsWith({
data: null,
errors: [{ message: 'Your account has been disabled.' }], errors: [{ message: 'Your account has been disabled.' }],
}) })
}) })

View File

@ -208,8 +208,8 @@ type Mutation {
unpinPost(id: ID!): Post unpinPost(id: ID!): Post
markTeaserAsViewed(id: ID!): Post markTeaserAsViewed(id: ID!): Post
shout(id: ID!, type: String): Boolean shout(id: ID!, type: String!): Boolean
unshout(id: ID!, type: String): Boolean unshout(id: ID!, type: String!): Boolean
} }
type Query { type Query {

View File

@ -227,7 +227,7 @@ type Mutation {
requestPasswordReset(email: String!): Boolean requestPasswordReset(email: String!): Boolean
resetPassword(nonce: String!, email: String!, newPassword: String!): Boolean resetPassword(nonce: String!, email: String!, newPassword: String!): Boolean
changePassword(oldPassword: String!, newPassword: String!): User changePassword(oldPassword: String!, newPassword: String!): String
login(email: String!, password: String!): User login(email: String!, password: String!): String
} }