Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengoldbaum committed Apr 19, 2024
2 parents 46bc943 + d888405 commit 46db5be
Show file tree
Hide file tree
Showing 31 changed files with 268 additions and 77 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@

.vscode/
package-lock.json
node_modules/
1 change: 1 addition & 0 deletions datashare/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ An example can be found in the [data folder](data). Some things to look for are:
* Open a browser to the written link.
* Execute any of the [sample queries](example_graphql_queries.json).


## TODO
* Define the standard for packaging and publishing.
* Define the standard for importing and depending on other packages.
Expand Down
1 change: 1 addition & 0 deletions datashare/data/Foo/foo.element.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"id":"element:Foo:foo","name":"Foo","element_type":{"Text":{}}}
1 change: 1 addition & 0 deletions datashare/data/Foo/foos.dataset.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"id":"dataset:Foo:foos","name":"Foos","fields":[{"name":"id","element":"element:person:id","key":true,"optional":false},{"name":"foo","element":"element:Foo:foo","key":false,"optional":false}]}
11 changes: 11 additions & 0 deletions datashare/data/core/integer.element.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"id":"element:core:integer",
"name":"Integer",
"element_type": {
"Number" : {
"minimum" : "-2147483647",
"maximum" : "2147483647",
"precision" : "0"
}
}
}
2 changes: 1 addition & 1 deletion datashare/data/person/active.element.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "urn:person:active",
"id": "element:person:active",
"name": "active",
"element_type": {"Boolean":{}}
}
2 changes: 1 addition & 1 deletion datashare/data/person/age.element.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "urn:person:age",
"id": "element:person:age",
"name": "age",
"description": "The age of a person",
"element_type": {
Expand Down
2 changes: 1 addition & 1 deletion datashare/data/person/age.element_info.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "urn:person:age",
"id": "element:person:age",
"description": "Age of the person",
"display_name": "Age"
}
9 changes: 9 additions & 0 deletions datashare/data/person/currency.element.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"id": "element:person:currency",
"name": "currency",
"element_type": {
"Enum":{
"values": ["AUD", "CAD", "CHF", "EUR", "GBP", "JPY", "USD"]
}
}
}
2 changes: 1 addition & 1 deletion datashare/data/person/date_of_birth.element.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "urn:person:date_of_birth",
"id": "element:person:date_of_birth",
"name": "Date of Birth",
"element_type": {"Date":{}}
}
2 changes: 1 addition & 1 deletion datashare/data/person/date_of_birth.element_info.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "urn:person:date_of_birth",
"id": "element:person:date_of_birth",
"description": "Date of birth of the person",
"display_name": "Date of Birth",
"short_display_name": "DOB"
Expand Down
2 changes: 1 addition & 1 deletion datashare/data/person/first_name.element.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "urn:person:first_name",
"id": "element:person:first_name",
"name": "First Name",
"element_type": {
"Text": {
Expand Down
2 changes: 1 addition & 1 deletion datashare/data/person/first_name.element_info.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "urn:person:first_name",
"id": "element:person:first_name",
"description": "First name of the person",
"display_name": "First Name",
"short_display_name": "FName"
Expand Down
2 changes: 1 addition & 1 deletion datashare/data/person/id.element.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "urn:person:id",
"id": "element:person:id",
"name": "ID",
"description": "The identifier of a person",
"element_type": {
Expand Down
2 changes: 1 addition & 1 deletion datashare/data/person/id.element_info.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "urn:person:id",
"id": "element:person:id",
"description": "ID of the person",
"display_name": "ID"
}
2 changes: 1 addition & 1 deletion datashare/data/person/last_name.element.info.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "urn:person:last_name",
"id": "element:person:last_name",
"description": "Last name of the person",
"display_name": "Last Name",
"short_display_name": "LName"
Expand Down
2 changes: 1 addition & 1 deletion datashare/data/person/last_name.element.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "urn:person:last_name",
"id": "element:person:last_name",
"name": "Last Name",
"element_type": {
"Text": {
Expand Down
2 changes: 1 addition & 1 deletion datashare/data/person/last_session.element.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "urn:person:last_session",
"id": "element:person:last_session",
"name": "Last Session",
"element_type": {
"DateTime": {
Expand Down
19 changes: 6 additions & 13 deletions datashare/data/person/people.dataset.json
Original file line number Diff line number Diff line change
@@ -1,49 +1,42 @@
{
"id": "urn:person:people",
"id": "dataset:person:people",
"name": "People",
"version": 1,
"fields": [
{
"name": "id",
"element": "urn:person:id",
"element": "element:person:id",
"description": "ID of the person",
"key": true,
"optional": false
},
{
"name": "firstName",
"element": "urn:person:first_name",
"element": "element:person:first_name",
"description": "First name of the person",
"key": false,
"optional": false
},
{
"name": "lastName",
"element": "urn:person:last_name",
"element": "element:person:last_name",
"description": "Last name of the person",
"key": false,
"optional": false
},
{
"name": "age",
"element": "urn:person:age",
"element": "element:person:age",
"description": "Age of the person",
"key": false,
"optional": false
},
{
"name": "dateOfBirth",
"element": "urn:person:date_of_birth",
"element": "element:person:date_of_birth",
"description": "Date of birth of the person",
"key": false,
"optional": true
},
{
"name": "savingsAmount",
"element": "urn:person:savings_amount",
"description": "Savings amount of the person",
"key": false,
"optional": true
}
]
}
6 changes: 4 additions & 2 deletions datashare/data/person/savings_amount.element.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"id": "urn:person:savings_amount",
"id": "element:person:savings_amount",
"name": "Savings Amount",
"element_type": {
"Number": {}
"Reference": {
"ref": "element:core:integer"
}
}
}
2 changes: 1 addition & 1 deletion datashare/data/person/savings_amount.element_info.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "urn:person:savings_amount",
"id": "element:person:savings_amount",
"description": "Savings amount of the person",
"display_name": "Savings Amount",
"short_display_name": "Savings"
Expand Down
9 changes: 9 additions & 0 deletions datashare/data/person/savings_amount_currency.element.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"id": "element:person:savings_amount_currency",
"name": "Savings Amount Currency",
"element_type": {
"Reference": {
"ref": "element:person:currency"
}
}
}
31 changes: 19 additions & 12 deletions datashare/data/person/users.dataset.json
Original file line number Diff line number Diff line change
@@ -1,47 +1,42 @@
{
"id": "urn:person:users",
"id": "dataset:person:users",
"name": "users",
"version": 1,
"fields": [
{
"name": "id",
"element": "urn:person:id",
"description": "ID of the person",
"element": "element:person:id",
"key": true,
"optional": false
},
{
"name": "firstName",
"element": "urn:person:first_name",
"description": "First name of the person",
"element": "element:person:first_name",
"key": false,
"optional": false
},
{
"name": "lastName",
"element": "urn:person:last_name",
"description": "Last name of the person",
"element": "element:person:last_name",
"key": false,
"optional": false
},
{
"name": "isActive",
"element": "urn:person:active",
"description": "Whether currently active",
"element": "element:person:active",
"key": false,
"optional": false
},
{
"name": "lastSession",
"element": "urn:person:last_session",
"description": "Timestamp of last session start",
"element": "element:person:last_session",
"key": false,
"optional": false
},
{
"name": "foo",
"element": {
"id": "urn:person:users#foo",
"id": "element:person:users#foo",
"name": "Foo",
"description": "Foo",
"element_type": { "Text": {} },
Expand All @@ -54,6 +49,18 @@
"description": "Foo",
"key": false,
"optional": false
},
{
"name": "savingsAmount",
"element": "element:person:savings_amount",
"key": false,
"optional": false
},
{
"name": "savingsAmountCurrency",
"element": "element:person:savings_amount_currency",
"key": false,
"optional": false
}
]
}
Loading

0 comments on commit 46db5be

Please sign in to comment.