Added favorite stash heart to scene tiles.
This commit is contained in:
@@ -4,12 +4,18 @@ const { makeExtendSchemaPlugin, gql } = require('graphile-utils');
|
||||
|
||||
const schemaExtender = makeExtendSchemaPlugin(_build => ({
|
||||
typeDefs: gql`
|
||||
extend type Release {}
|
||||
extend type Release {
|
||||
isStashed: Boolean @requires(columns: ["stashesScenesBySceneId"])
|
||||
}
|
||||
`,
|
||||
resolvers: {
|
||||
Release: {
|
||||
async foo(_parent, _args, _context, _info) {
|
||||
// template
|
||||
isStashed(parent) {
|
||||
if (!parent['@stashes']) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return parent['@stashes'].length > 0;
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user