This repository was archived by the owner on Apr 14, 2023. It is now read-only.
This repository was archived by the owner on Apr 14, 2023. It is now read-only.
GraphQL and variable schemas #5
Closed
Description
Maybe I'm missing the obvious, but how will we be able to retrieve / mutate data with variable schema? Consider the following scenario:
- Mongo collection where each document contains a the schema definition for a sub-document. This schema is not fixed but varies from document to document. How can we retrieve such documents when we don't know in advance its schema?
Example collection:
[
{
"_id": "1",
"name": "A",
"fldDef": [
{
"name": "f1",
"type": "str",
"opt": false
},
{
"name": "f2",
"type": "bool"
}
],
"flds": {
"f1": "value1",
"f2": true
}
},
{
"_id": "2",
"name": "B",
"fldDef": [
{
"name": "f3",
"type": "str",
"opt": true
},
{
"name": "f4",
"type": "str",
"opt": true
},
{
"name": "f5",
"type": "num"
}
],
"flds": {
"f3": "value3",
"f5": 25
}
}
]
Metadata
Metadata
Assignees
Labels
No labels