Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
bonustrack committed Apr 18, 2021
1 parent a9b8301 commit 43c13e2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
9 changes: 6 additions & 3 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@ import cors from 'cors';
import { graphqlHTTP } from 'express-graphql';
import api from './server';
import { schema, rootValue } from './server/graphql';
import timelineQuery from './server/graphql/example';
import defaultQuery from './server/graphql/examples';

export default (app, server) => {
export default app => {
app.use(bodyParser.json({ limit: '20mb' }));
app.use(bodyParser.urlencoded({ limit: '20mb', extended: false }));
app.use(frameguard({ action: 'deny' }));
app.use(cors());
app.use('/api', api);
app.use('/graphql', graphqlHTTP({ schema, rootValue, graphiql: { defaultQuery: timelineQuery }}));
app.use(
'/graphql',
graphqlHTTP({ schema, rootValue, graphiql: { defaultQuery } })
);
app.get('/*', (req, res) => res.redirect('/api'));
};
33 changes: 15 additions & 18 deletions server/graphql/example.ts → server/graphql/examples.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
const timelineQuery = `query Timeline {
timeline(first: 5, spaces: ["balancer", "yam.eth"]) {
id
author
timestamp
start
end
state
space {
id
name
members
}
}
}`


export default timelineQuery
export default `query Timeline {
timeline(first: 5, spaces: ["balancer", "yam.eth"]) {
id
author
timestamp
start
end
state
space {
id
name
members
}
}
}`;

0 comments on commit 43c13e2

Please sign in to comment.