Compare commits

...

2 Commits

Author SHA1 Message Date
DebaucheryLibrarian 9bc6907024 0.25.7 2024-06-25 02:43:06 +02:00
DebaucheryLibrarian 4985a0eb59 Fixed search page collapsing when not enough results. 2024-06-25 02:43:04 +02:00
4 changed files with 31 additions and 3 deletions

4
package-lock.json generated
View File

@ -1,11 +1,11 @@
{ {
"name": "traxxx-web", "name": "traxxx-web",
"version": "0.25.6", "version": "0.25.7",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"version": "0.25.6", "version": "0.25.7",
"dependencies": { "dependencies": {
"@brillout/json-serializer": "^0.5.8", "@brillout/json-serializer": "^0.5.8",
"@dicebear/collection": "^7.0.5", "@dicebear/collection": "^7.0.5",

View File

@ -77,5 +77,5 @@
"postcss-custom-media": "^10.0.2", "postcss-custom-media": "^10.0.2",
"postcss-nesting": "^12.0.2" "postcss-nesting": "^12.0.2"
}, },
"version": "0.25.6" "version": "0.25.7"
} }

View File

@ -105,6 +105,7 @@ const query = pageContext.urlParsed.search.q;
.page { .page {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
flex-grow: 1;
} }
.row { .row {

27
src/web/graphql.js Normal file
View File

@ -0,0 +1,27 @@
import { graphql, buildSchema } from 'graphql';
import { scenesSchema, fetchScenesGraphql } from './scenes.js';
const schema = buildSchema(`
type Query {
scenes: [Scene]
}
${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,
});
console.log(data);
res.send(data);
}