-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
41 lines (36 loc) · 8.24 KB
/
index.js
File metadata and controls
41 lines (36 loc) · 8.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
const express = require("express");
const { postgraphile, makePluginHook } = require("postgraphile");
const PersistedOperationsPlugin = require("@graphile/persisted-operations");
require('dotenv').config();
const pluginHook = makePluginHook([
PersistedOperationsPlugin,
]);
const app = express();
app.use(
postgraphile(
process.env.MAIN_CONNECTION_URL,
"public",
{
// Hard code for now, find them in server-persised-operations.json in the website repo.
// Later move to a file with persistedOperationsDirectory.
pluginHook,
persistedOperations: {
"1bbab2302545229de50655449dfa5ee591d7be8085a36c3da258ffcdb370ae67": "query GetAuctions($offset: Int!) {\n allAuctions(orderBy: BID_START_BLOCK_DESC, first: 10, offset: $offset) {\n nodes {\n address\n name\n bidStartBlock\n mintStartBlock\n chainId\n maxUnits\n price\n bidsByAuctionAddressAndAuctionName {\n totalCount\n __typename\n }\n __typename\n }\n totalCount\n __typename\n }\n}",
"a9ff872eab405afe12c29862a816d25c04f06bbad7abdc33b81a6875d1084ea3": "query GetAuction($address: String!, $name: String!) {\n auctionByAddressAndName(address: $address, name: $name) {\n address\n name\n price\n bidStartBlock\n mintStartBlock\n maxUnits\n chainId\n bidsByAuctionAddressAndAuctionName {\n totalCount\n __typename\n }\n __typename\n }\n}",
"b291a34e06de7b740bbd31074ac63f4d5cffc1e76e90b74c8d0c6dd61a9fa0b7": "query GetAuctionBids($address: String!, $name: String!, $offset: Int!) {\n auctionByAddressAndName(address: $address, name: $name) {\n chainId\n bidsByAuctionAddressAndAuctionName(first: 10, offset: $offset, orderBy: SUBMITTED_TIMESTAMP_DESC) {\n nodes {\n bidId\n signer\n status\n submittedTimestamp\n tipRevealed\n amount\n __typename\n }\n totalCount\n __typename\n }\n __typename\n }\n}",
"cd6710d56b63c80501ec0e5e15991395fdab9e995ee5033c3b286f325a033fe8": "query GetBid($bidId: String!) {\n bidByBidId(bidId: $bidId) {\n bidId\n auctionAddress\n auctionName\n bundleHash\n replacedBy\n signer\n signature\n status\n submittedTimestamp\n statusLastUpdated\n tipRevealed\n txHash\n amount\n auctionByAuctionAddressAndAuctionName {\n price\n chainId\n __typename\n }\n __typename\n }\n}",
"870ccbdbfb9a159a95c62c424e260a89001e9cccbda5a1086a869dbfd109026c": "query HealthCheck {\n __typename\n}"
},
enableCors: true,
ownerConnectionString: process.env.OWNER_CONNECTION_URL,
watchPg: true,
graphiql: true,
enhanceGraphiql: true,
}
),
);
app.get('/pika', (req, res) => {
console.log('pikachu!');
res.status(200).send('⣿⣿⡿⠿⠿⠟⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⠟⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠩⣝⠿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡾⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⢌⢷⣄⣀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀\n⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡾⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠁⠉⠉⠉⠉⠉⠉⠉⠙⠓⠒⠒⠶⠶\n⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⠃⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿⠀⠀⠀⠀⡀⠀⢀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢷⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀\n⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠇⠀⠀⠀⣼⣶⠟⠲⣦⣴⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⢹⣽⣶⣤⡀⠀⠀⠀⠀⠀\n⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡟⠀⠀⠀⠀⠀⠉⠀⠀⢠⡿⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣾⠀⠉⠉⠛⠲⠶⢤⣄⣀\n⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣾⠟⠙⠳⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⠀⠀⠀⠀⠀⠀⣶⣯⣧⣤⣄⡐⢀⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀\n⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⡏⠀⠀⠀⢹⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠭⠇⠀⠀⠀⠀⠀⠀⠙⠓⠂⠀⢉⡻⣶⡀⠀⠀⠀⠀⠀⠀⣾⠀⠀⠀⠀⠀⠀⠀⠀⠀\n⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⡀⠀⠀⠀⠀⠀⣿⡃⠀⠀⠀⢸⡇⠀⠀⠀⠀⠰⣦⡀⠀⢀⣰⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⠋⠀⠀⠀⠀⠀⠀⠀⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀\n⠀⠀⠀⠀⠀⠀⠀⣴⡿⠇⢟⠦⢤⣀⠀⠀⢻⡇⠀⠀⢀⣼⠇⡀⠀⠀⠀⠀⠈⢻⣿⣿⣿⣿⣦⡀⠀⠀⢀⡴⠀⠀⠀⠀⠀⠀⢀⣀⣀⡀⠀⠀⠀⠀⢀⡇⠀⠀⠀⠀⠀⠀⡤⠔⠒\n⠀⠀⠀⠀⠀⠀⠀⡿⢃⣀⡶⠀⠀⠈⠓⢦⡀⢿⡀⣄⣿⡟⠀⠀⠀⠀⠀⠀⠀⢸⡏⠀⠀⠀⠉⠛⣷⠖⠋⠁⠀⠀⠀⢀⣴⠾⠋⠉⠉⠙⢷⣄⠀⠀⣸⠀⠀⠀⠀⠀⠀⠀⢷⠀⠀\n⠀⠀⠀⠀⠀⠀⢸⡇⣴⠟⠗⠂⠀⠀⠀⠁⠙⠺⣟⠛⠋⠀⠀⠀⠀⠀⠀⠀⠀⠸⡇⠀⠀⠀⠀⢱⡟⠀⠀⠀⠀⠀⠀⣼⣯⠀⠀⠀⠀⠀⠀⢻⡀⠀⡏⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀\n⠀⠀⠀⠀⠀⠀⠈⢿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⢠⡟⠀⠀⠀⠀⠀⠀⢰⡿⠓⠀⠀⠀⠀⠀⠀⣸⠇⣸⠁⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀\n⠀⠀⠀⠀⠀⠀⠀⠸⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⢧⠀⠀⠀⠀⠀⠀⠀⠀⠀⢷⡀⠀⢠⡿⠁⠀⠀⠀⠀⠀⠀⠈⢿⣆⡀⠰⠆⠀⠀⣰⡿⣰⠃⠀⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀\n⠀⠀⠀⠀⠀⠀⠀⠀⢻⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠳⣄⠀⠀⠀⠀⠀⠀⠀⠘⢧⠴⠟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠻⢷⣤⣤⣤⠶⠛⣱⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⡇⠀\n⠀⠀⠀⠀⠀⠀⠀⠀⠈⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡾⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀\n⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠋⠛⠲⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀\n⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢿⡛⠲⠶⠤⢤⣀⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠳⢮⣉⠀⠀⠀⠀⠀⠀⣿⠀\n⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⢧⡀⠀⠀⠀⠀⠀⢠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠦⠤⠤⠤⠖⠛⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⣀⣀⣀⣀⡀⠉⠳⣶⠒⠚⠛⠋⠉⠀\n⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢷⣄⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⡖⠛⠉⠉⠁⠀⠀⠈⠉⠁⠀⠀⠈⢳⡀⠀⠀⠀⠀\n⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢿⣳⣄⡀⠀⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣆⠀⠀⠀\n⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣬⣷⡍⠳⣦⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢾⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⡦⠤⠒\n⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠒⠋⠁⠀⠀⢿⣦⣾⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⢷⣶⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀\n⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣮⡙⠦⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀\n⣏⡀⠀⠀⣀⣤⡄⢀⡀⠀⠀⠀⠐⠒⠀⠘⣻⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠻⣆⠈⠛⠶⣄⡀⠀⠀⠀⢀⣤⣾⣷⣰⣶\n⣯⠀⠀⢤⣭⣬⣤⣠⣤⣀⣠⠀⡀⠀⠀⢠⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣯⡛⢦⣤⣀⣉⡉⣛⣛⣽⠿⠣⣿⡟⠛\n');
});
app.listen(process.env.PORT || 5000);