Fixed search page collapsing when not enough results.
This commit is contained in:
parent
b3c56a7e85
commit
4985a0eb59
|
@ -105,6 +105,7 @@ const query = pageContext.urlParsed.search.q;
|
|||
.page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.row {
|
||||
|
|
|
@ -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);
|
||||
}
|
Loading…
Reference in New Issue