Skip to content

Commit

Permalink
Added Record Type and fixed examples
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengoldbaum committed Jun 4, 2024
1 parent 754f4a9 commit bb29eea
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 2 deletions.
1 change: 1 addition & 0 deletions DataThread/data/Foo/Bah/foo.element.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"id":"element:/Foo/Bah:foo","name":"Foo","element_type":{"Text":{}}}
13 changes: 13 additions & 0 deletions DataThread/data/Foo/Bah/foos.dataset.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"id": "dataset:/Foo/Bah:foos",
"name": "Foos",
"version": 1,
"fields": [
{
"name": "foo",
"element": "element:/Foo/Bah:foo",
"key": false,
"optional": false
}
]
}
2 changes: 1 addition & 1 deletion DataThread/example/test.foo.dataset.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"fields": [
{
"name": "foo",
"element": "element:Foo:foo",
"element": "element:/Foo/Bah:foo",
"key": false,
"optional": false
}
Expand Down
18 changes: 17 additions & 1 deletion DataThread/src/DataThread/Grammar/Element.schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ type Element {
info: ElementInfo
}

union ElementType = TextType | NumberType | ReferenceType | DateType | TimeType | DateTimeType | BooleanType | EnumType
union ElementType = TextType | NumberType | ReferenceType | DateType | TimeType | DateTimeType | BooleanType | EnumType | RecordType

scalar Date

Expand Down Expand Up @@ -66,6 +66,22 @@ type Enum {
values: [String]!
}

type RecordType {
Record : Record!
}

type Record {
name: String
fields: [Field]
}

type Field {
name: String!
element: Element!
optional: Boolean
}


type ElementInfo {
id: ID!
description: String
Expand Down

0 comments on commit bb29eea

Please sign in to comment.