Skip to content

Commit 624b3ee

Browse files
committed
add schemas
1 parent 62eddc3 commit 624b3ee

3 files changed

Lines changed: 65405 additions & 1 deletion

File tree

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
11
# data.all core package
22

3-
This is a package containing dataall_core modules used in both data.all CLI and SDK.
3+
This is a package containing dataall_core modules used in both data.all CLI and SDK.
4+
5+
6+
# generate schema from a data.all deployments
7+
8+
* Copy and run the following script in `data.all/backend` directory...
9+
```python
10+
from dataall.base.loader import load_modules, ImportMode
11+
from graphql import introspection_from_schema
12+
from dataall.base.api import get_executable_schema
13+
import json
14+
15+
load_modules(modes={ImportMode.API})
16+
SCHEMA = get_executable_schema()
17+
t = introspection_from_schema(SCHEMA)
18+
19+
# Write schema to JSON file
20+
with open('./schema.json', 'w') as f:
21+
f.write(json.dumps(t))
22+
```
23+

0 commit comments

Comments
 (0)