Last active
April 21, 2020 07:47
-
-
Save joeboyscout04/6e43859c81030661b461ea1b3ddac7b5 to your computer and use it in GitHub Desktop.
Proposal for GraphQL data schema
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum CatchStatisticsProperty { | |
WEATHER_CONDITION | |
WIND_DIRECTION | |
WIND_SPEED | |
AIR_PRESSURE | |
MOON_PHASE | |
SUN_PHASE | |
HOUR_OF_DAY | |
MONTH_OF_YEAR | |
AIR_TEMPERATURE | |
LURE_CATEGORY | |
FISHING_METHOD | |
} | |
/// Idea 1 | |
catchStatistics(fromDate: Date?, toDate: Date?, speciesId: [Int!]?, property: CatchStatisticsProperty!) { | |
xAxisTitle: String! | |
yAxisTitle: String! | |
xAxisLabels: [AxisSeries] | |
dataSeries: [DataSeries]! | |
} | |
DataSeries { | |
name: String? | |
values: [Float!]! | |
} | |
AxisSeries { | |
name: String! | |
value: Float? | |
} | |
/// Example with data | |
{ | |
"xAxisTitle": "Air Pressure (kPa)", | |
"yAxisTitle": "Number of Catches", | |
"xAxisLabels": [ | |
{ | |
"name": "990", | |
"value": 990 | |
}, | |
{ | |
"name": "1000", | |
"value": 1000 | |
}, | |
{ | |
"name": "1010", | |
"value": 1010 | |
} | |
], | |
"dataSeries": [ | |
{ | |
name: "Catches" | |
values: [0,3,10] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment