Added favorite stash heart to scene tiles.

This commit is contained in:
DebaucheryLibrarian
2021-03-19 03:27:48 +01:00
parent f3d55806d1
commit 731a2792c5
15 changed files with 146 additions and 28 deletions

View File

@@ -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;
},
},
},