Added secondary stash menu to stash heart.

This commit is contained in:
2024-07-07 21:01:44 +02:00
parent 8cada40311
commit dbc6ee0c6c
9 changed files with 171 additions and 72 deletions

View File

@@ -9,16 +9,14 @@ const schema = buildSchema(`
${scenesSchema}
`);
const rootValue = {
scenes: fetchScenesGraphql,
};
export async function graphqlApi(req, res) {
const data = await graphql({
schema,
source: req.body.query,
variableValues: req.body.variables,
rootValue,
rootValue: {
scenes: async (query) => fetchScenesGraphql(query, req),
},
});
console.log(data);

View File

@@ -76,16 +76,21 @@ export const scenesSchema = `
export async function fetchScenesGraphql(query, req) {
const {
scenes,
/*
aggActors,
aggTags,
aggChannels,
limit,
total,
*/
} = await fetchScenes({}, {
page: 1,
limit: 30,
}, req.user);
return scenes;
/*
return {
scenes,
aggActors,
@@ -94,4 +99,5 @@ export async function fetchScenesGraphql(query, req) {
limit,
total,
};
*/
}