-
Notifications
You must be signed in to change notification settings - Fork 52
/
schema.graphql
38 lines (33 loc) · 911 Bytes
/
schema.graphql
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
type IntradayStockPrice @model(subscriptions: null)
@key(name: "BySymbol", fields: ["symbol", "data_timestamp"])
{
id: ID!
symbol: String!
data_timezone: String!
data_timestamp: Int!
open_price: Float
high_price: Float
low_price: Float
close_price: Float
volume: Int
}
type Subscription {
intradayStockPriceCreated(symbol: String): IntradayStockPrice @aws_subscribe(mutations: ["createIntradayStockPrice"])
}
type StockSymbol @model(subscriptions: null) @auth(rules: [{allow: owner}]) {
id: ID!
symbol: String!
owner: String
}
type StockSymbolConnection {
items: [StockSymbol],
nextToken: String
}
type IntradayStockPriceConnection {
items: [IntradayStockPrice],
nextToken: String
}
type Query {
listAllStockSymbols(limit: Int, nextToken: String): StockSymbolConnection
retrieveLatestIntradayPrices(symbol: String, ts: Int, limit: Int, nextToken: String): IntradayStockPriceConnection
}