This repository was archived by the owner on May 8, 2024. It is now read-only.
forked from windingtree/orgid-subgraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.graphql
92 lines (81 loc) · 1.62 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# An address
type OrganizationAddress @entity {
id: ID!
country: String
subdivision: String
locality: String
postalCode: String
streetAddress: String
premise: String
}
# The type of public keys
enum PublicKeyType {
secp256k1
}
# A public Key
type PublicKey @entity {
id: ID!
type: PublicKeyType!
publicKeyPem: String!
controller: String
note: String
}
# An API Service
type Service @entity {
id: ID!
serviceEndpoint: String!
type: String
version: String
description: String
docs: String
}
# Define the Legal Entity type
type LegalEntity @entity {
id: ID!
legalName: String
legalType: String
legalIdentifier: String
registeredAddress: OrganizationAddress
logoUri: String
organization: Organization
}
# Define the Organizational Unit type
type OrganizationalUnit @entity {
id: ID!
name: String
description: String
longDescription: String
type: [String!]
address: OrganizationAddress
logoUri: String
organization: Organization
}
enum OrganizationType {
Unknown
LegalEntity
OrganizationalUnit
}
# Define an Organization
type Organization @entity {
# ORGiD value
id: ID!
did: String
# Mirrored from Smart-contract
owner: Bytes! # address
isActive: Boolean
director: Bytes # address
orgJsonHash: Bytes
ipfsCid: String
# Mapping with other Organizations
units: [Organization!]
parent: Organization
# From offchain data
organizationType: OrganizationType!
legalEntity: LegalEntity
organizationalUnit: OrganizationalUnit
publicKey: [PublicKey!]
service: [Service!]
# Creation stats
createdAtTimestamp: BigInt!
createdAtBlockNumber: BigInt!
}