Skip to content

Commit

Permalink
Fix qlkube schema generation
Browse files Browse the repository at this point in the history
Remove underscores from schema
  • Loading branch information
QcFe committed May 30, 2024
1 parent 5f8d88b commit b651d09
Show file tree
Hide file tree
Showing 3 changed files with 280 additions and 7 deletions.
2 changes: 1 addition & 1 deletion qlkube/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"apollo-server-express": "^2.25.1",
"compression": "^1.7.4",
"dotenv": "^9.0.2",
"express": "^4.17.3",
"express": "^4.19.2",
"express-graphql": "^0.12.0",
"got": "^9.6.0",
"graphql": "^15.5.1",
Expand Down
7 changes: 6 additions & 1 deletion qlkube/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,12 @@ async function main() {
app.use(compression());
app.get('/schema', (req, res) => {
res.setHeader('content-type', 'text/plain');
res.send(printSchema(schema));
res.send(
printSchema(schema)
.split('\n')
.filter(l => l.trim() != '_') // remove empty values from enums
.join('\n')
);
});
app.get('/healthz', (req, res) => {
res.sendStatus(200);
Expand Down
Loading

0 comments on commit b651d09

Please sign in to comment.