-
Notifications
You must be signed in to change notification settings - Fork 20
/
datasource-schema.js
96 lines (83 loc) · 1.64 KB
/
datasource-schema.js
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
93
94
95
96
const { gql } = require('apollo-server');
const dataSourcesTypeDefs = gql`
type DataSources {
versionDescription: String
name: String
filesCount: Int
avgFileSize: Float
totalSize: Int
id: String
fileTypes: [String ]
}
type Files {
path: String
id: String
name: String
size: Int
type: String
meta: String
uploadedAt: String
}
type Storage {
kind: String
}
type Git {
kind: String
repositoryUrl: String
}
type DataSource {
name: String
versionDescription: String
commitHash: String
isPartial: Boolean
id: String
path: String
files: [Files]
storage: Storage
git: Git
}
type DataSourceVersions {
versionDescription: String
commitHash: String
id: String
}
type DroppedFiles {
path: String
id: String
name: String
size: Int
type: String
meta: String
uploadedAt: String
}
type FilteredFilesList {
path: String
id: String
name: String
size: Int
type: String
meta: String
uploadedAt: String
}
type DataSourceMeta {
id: String
name: String
}
type DataSourceSnapanshots {
query: String
name: String
id: String
droppedFiles: [DroppedFiles]
filteredFilesList: [FilteredFilesList]
dataSource: DataSourceMeta
}
type AutogeneratedDataSources { list: [DataSources ],dataSourcesCount:Int }
extend type Query {
dataSources:AutogeneratedDataSources,
dataSource(name:String!,id:String!): DataSource
DataSourceVersions(name:String!): [DataSourceVersions]
DataSourceSnapanshots(name:String!): [DataSourceSnapanshots],
DataSourcePreviewQuery(id:String!,query:String!): [FilteredFilesList]
}
`
module.exports = dataSourcesTypeDefs;