Added secondary stash menu to stash heart.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
*/
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user