Adapters
chemistry
biology
finance
legal
art
climate
agent
Merge
BACCHUS45 commited on
Commit
a295b09
·
verified ·
1 Parent(s): 9abc8f4

Create schema-potholes.graphql

Browse files
Files changed (1) hide show
  1. schema-potholes.graphql +82 -0
schema-potholes.graphql ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ scalar DateTime
2
+ scalar JSON
3
+
4
+ enum Namespace {
5
+ infrastructure
6
+ satellite
7
+ # ... other namespaces
8
+ }
9
+
10
+ type Location {
11
+ lat: Float
12
+ lon: Float
13
+ }
14
+
15
+ type Provenance {
16
+ source: String!
17
+ license: String
18
+ retrieved_at: DateTime!
19
+ }
20
+
21
+ type Infrastructure {
22
+ id: ID!
23
+ location: Location!
24
+ roadCondition: String
25
+ severity: Int
26
+ lastReportedAt: DateTime
27
+ provenance: Provenance
28
+ }
29
+
30
+ # Pothole / Fault object
31
+ type InfrastructureFault {
32
+ id: ID!
33
+ namespace: Namespace!
34
+ type: String!
35
+ timestamp: DateTime!
36
+ location: Location!
37
+ severity: Int!
38
+ confirmed: Boolean!
39
+ images: [String]
40
+ provenance: Provenance!
41
+ }
42
+
43
+ type Payout {
44
+ id: ID!
45
+ faultId: ID!
46
+ amountMinorUnits: Int!
47
+ currency: String!
48
+ payeeId: String!
49
+ status: String!
50
+ createdAt: DateTime!
51
+ settledAt: DateTime
52
+ txRef: String
53
+ }
54
+
55
+ type Query {
56
+ infraFault(id: ID!): InfrastructureFault
57
+ listInfraFaults(limit: Int, offset: Int): [InfrastructureFault!]
58
+ payoutsForFault(faultId: ID!): [Payout!]
59
+ }
60
+
61
+ input IngestFaultInput {
62
+ namespace: Namespace!
63
+ type: String!
64
+ timestamp: DateTime!
65
+ location: JSON!
66
+ severity: Int!
67
+ images: [String]
68
+ provenance: JSON
69
+ }
70
+
71
+ type Mutation {
72
+ ingestFault(input: IngestFaultInput!): InfrastructureFault!
73
+ confirmFault(id: ID!, confirmed: Boolean!): InfrastructureFault!
74
+ createPayout(faultId: ID!, amountMinorUnits: Int!, currency: String!, payeeId: String!): Payout!
75
+ settlePayout(payoutId: ID!): Payout!
76
+ }
77
+
78
+ type Subscription {
79
+ faultCreated: InfrastructureFault!
80
+ faultConfirmed: InfrastructureFault!
81
+ payoutUpdated: Payout!
82
+ }