Exposed comment and meta fields in GraphQL API.
This commit is contained in:
@@ -28,12 +28,16 @@ export const stashesSchema = `
|
||||
createStash(
|
||||
name: String!
|
||||
isPublic: Boolean
|
||||
comment: String
|
||||
meta: JSON
|
||||
): Stash
|
||||
|
||||
updateStash(
|
||||
stash: String!
|
||||
name: String
|
||||
isPublic: Boolean
|
||||
comment: String
|
||||
meta: JSON
|
||||
): Stash
|
||||
|
||||
removeStash(
|
||||
@@ -78,6 +82,8 @@ export const stashesSchema = `
|
||||
isPublic: Boolean
|
||||
isPrimary: Boolean
|
||||
createdAt: Date
|
||||
comment: String
|
||||
meta: JSON
|
||||
}
|
||||
|
||||
type Stashed {
|
||||
@@ -98,13 +104,13 @@ export async function fetchUserStashesApi(req, res) {
|
||||
}
|
||||
|
||||
export async function fetchUserStashesGraphql(query, req) {
|
||||
const stashes = await fetchUserStashes(query.username || req.userId, req.user);
|
||||
const stashes = await fetchUserStashes(query.username || req.user.id, req.user);
|
||||
|
||||
return stashes;
|
||||
}
|
||||
|
||||
export async function fetchStashGraphql(query, req) {
|
||||
const stashes = await fetchStashByUsernameAndSlug(query.username || req.userId, query.stash, req.user);
|
||||
const stashes = await fetchStashByUsernameAndSlug(query.username || req.user.id, query.stash, req.user);
|
||||
|
||||
return stashes;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user