Compare commits
2 Commits
b3c56a7e85
...
9bc6907024
Author | SHA1 | Date |
---|---|---|
|
9bc6907024 | |
|
4985a0eb59 |
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
"name": "traxxx-web",
|
||||
"version": "0.25.6",
|
||||
"version": "0.25.7",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"version": "0.25.6",
|
||||
"version": "0.25.7",
|
||||
"dependencies": {
|
||||
"@brillout/json-serializer": "^0.5.8",
|
||||
"@dicebear/collection": "^7.0.5",
|
||||
|
|
|
@ -77,5 +77,5 @@
|
|||
"postcss-custom-media": "^10.0.2",
|
||||
"postcss-nesting": "^12.0.2"
|
||||
},
|
||||
"version": "0.25.6"
|
||||
"version": "0.25.7"
|
||||
}
|
||||
|
|
|
@ -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