@paris-ias/trees 1.8.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +679 -0
- package/dist/form/action.js +83 -0
- package/dist/form/affiliation.js +178 -0
- package/dist/form/apps.js +132 -0
- package/dist/form/disciplines.js +30 -0
- package/dist/form/events.js +836 -0
- package/dist/form/fellowships.js +1307 -0
- package/dist/form/files.js +30 -0
- package/dist/form/mailing.js +43 -0
- package/dist/form/news.js +252 -0
- package/dist/form/people.js +658 -0
- package/dist/form/projects.js +338 -0
- package/dist/form/publications.js +364 -0
- package/dist/form/tags.js +38 -0
- package/dist/form/users.js +576 -0
- package/dist/graphql/client/action/query.get.action.gql +22 -0
- package/dist/graphql/client/action/query.list.action.gql +32 -0
- package/dist/graphql/client/affiliation/query.get.affiliations.gql +37 -0
- package/dist/graphql/client/affiliation/query.list.affiliations.gql +43 -0
- package/dist/graphql/client/apps/query.get.apps.gql +33 -0
- package/dist/graphql/client/apps/query.list.apps.gql +43 -0
- package/dist/graphql/client/events/query.get.events.gql +119 -0
- package/dist/graphql/client/events/query.list.events.gql +40 -0
- package/dist/graphql/client/fellowships/query.get.fellowships.gql +163 -0
- package/dist/graphql/client/fellowships/query.list.fellowships.gql +49 -0
- package/dist/graphql/client/files/query.get.files.gql +24 -0
- package/dist/graphql/client/files/query.list.files.gql +37 -0
- package/dist/graphql/client/mailing/query.get.mailing.gql +24 -0
- package/dist/graphql/client/mailing/query.list.mailing.gql +23 -0
- package/dist/graphql/client/misc/apex.mutations.delete.gql +0 -0
- package/dist/graphql/client/misc/apex.mutations.upsert.gql +0 -0
- package/dist/graphql/client/misc/apex.queries.login.gql +0 -0
- package/dist/graphql/client/misc/query.get.disciplines.gql +17 -0
- package/dist/graphql/client/misc/query.get.tags.gql +13 -0
- package/dist/graphql/client/misc/query.list.disciplines.gql +23 -0
- package/dist/graphql/client/misc/query.list.tags.gql +23 -0
- package/dist/graphql/client/news/query.get.news.gql +128 -0
- package/dist/graphql/client/news/query.list.news.gql +35 -0
- package/dist/graphql/client/people/query.get.people.gql +173 -0
- package/dist/graphql/client/people/query.get.users.gql +0 -0
- package/dist/graphql/client/people/query.list.people.gql +55 -0
- package/dist/graphql/client/people/query.list.users.gql +31 -0
- package/dist/graphql/client/projects/query.get.projects.gql +166 -0
- package/dist/graphql/client/projects/query.list.projects.gql +33 -0
- package/dist/graphql/client/publications/query.get.publications.gql +169 -0
- package/dist/graphql/client/publications/query.list.publications.gql +35 -0
- package/dist/graphql/schemas/apex-resolvers-list.json +45 -0
- package/dist/graphql/schemas/schema.apex.graphql +946 -0
- package/dist/graphql/schemas/schema.website.graphql +794 -0
- package/dist/graphql/schemas/website-resolvers-list.json +22 -0
- package/dist/list/action.js +133 -0
- package/dist/list/affiliation.js +133 -0
- package/dist/list/apps.js +133 -0
- package/dist/list/disciplines.js +132 -0
- package/dist/list/events.js +186 -0
- package/dist/list/fellowships.js +149 -0
- package/dist/list/files.js +132 -0
- package/dist/list/mailing.js +132 -0
- package/dist/list/news.js +135 -0
- package/dist/list/people.js +176 -0
- package/dist/list/projects.js +135 -0
- package/dist/list/publications.js +152 -0
- package/dist/list/tags.js +133 -0
- package/dist/list/users.js +176 -0
- package/index.ts +63 -0
- package/lib/README.md +206 -0
- package/lib/buildClientGraphQL.ts +342 -0
- package/lib/buildDefaults.ts +0 -0
- package/lib/buildSchemas.ts +109 -0
- package/lib/generate.ts +505 -0
- package/lib/generateAll.ts +231 -0
- package/lib/utils.ts +24 -0
- package/package.json +34 -0
- package/readme.md +116 -0
- package/src/LICENSE +661 -0
- package/src/action/graphql/client/query.get.action.gql +22 -0
- package/src/action/graphql/client/query.list.action.gql +32 -0
- package/src/action/graphql/server/apex.types.action.graphql +15 -0
- package/src/action/models/action.ts +147 -0
- package/src/affiliation/graphql/client/query.get.affiliations.gql +37 -0
- package/src/affiliation/graphql/client/query.list.affiliations.gql +43 -0
- package/src/affiliation/graphql/server/shared.types.affiliations.graphql +20 -0
- package/src/affiliation/models/affiliation.ts +130 -0
- package/src/affiliation/models/member.ts +11 -0
- package/src/affiliation/models/partner.ts +9 -0
- package/src/apps/graphql/client/query.get.apps.gql +33 -0
- package/src/apps/graphql/client/query.list.apps.gql +43 -0
- package/src/apps/models/apps.ts +195 -0
- package/src/events/graphql/client/query.get.events.gql +119 -0
- package/src/events/graphql/client/query.list.events.gql +40 -0
- package/src/events/graphql/server/shared.inputs.events.graphql +24 -0
- package/src/events/models/eventSlot.ts +73 -0
- package/src/events/models/events.ts +569 -0
- package/src/fellowships/graphql/client/query.get.fellowships.gql +163 -0
- package/src/fellowships/graphql/client/query.list.fellowships.gql +49 -0
- package/src/fellowships/graphql/server/apex.inputs.fellowshipDetails.graphql +13 -0
- package/src/fellowships/graphql/server/shared.types.fellowshipDetails.graphql +13 -0
- package/src/fellowships/graphql/server/shared.types.fellowships.graphql +38 -0
- package/src/fellowships/models/fellowshipDetails.ts +145 -0
- package/src/fellowships/models/fellowships.ts +341 -0
- package/src/files/graphql/client/query.get.files.gql +24 -0
- package/src/files/graphql/client/query.list.files.gql +37 -0
- package/src/files/graphql/server/apex.inputs.files.graphql +7 -0
- package/src/files/graphql/server/apex.inputs.video.graphql +9 -0
- package/src/files/graphql/server/apex.types.files.graphql +4 -0
- package/src/files/graphql/server/shared.inputs.image.graphql +9 -0
- package/src/files/graphql/server/shared.types.files.graphql +15 -0
- package/src/files/graphql/server/shared.types.image.graphql +9 -0
- package/src/files/graphql/server/shared.types.video.graphql +9 -0
- package/src/files/models/files.ts +113 -0
- package/src/files/models/gallery.ts +11 -0
- package/src/files/models/image.ts +159 -0
- package/src/files/models/video.ts +166 -0
- package/src/form.ts +52 -0
- package/src/index.ts +98 -0
- package/src/list.ts +34 -0
- package/src/mailing/graphql/client/query.get.mailing.gql +24 -0
- package/src/mailing/graphql/client/query.list.mailing.gql +23 -0
- package/src/mailing/graphql/server/apex.types.mailing.graphql +13 -0
- package/src/mailing/models/mailing.ts +123 -0
- package/src/misc/graphql/client/apex.mutations.delete.gql +0 -0
- package/src/misc/graphql/client/apex.mutations.upsert.gql +0 -0
- package/src/misc/graphql/client/apex.queries.login.gql +0 -0
- package/src/misc/graphql/client/query.get.disciplines.gql +17 -0
- package/src/misc/graphql/client/query.get.tags.gql +13 -0
- package/src/misc/graphql/client/query.list.disciplines.gql +23 -0
- package/src/misc/graphql/client/query.list.tags.gql +23 -0
- package/src/misc/graphql/server/apex.inputs.misc.graphql +13 -0
- package/src/misc/graphql/server/apex.inputs.socials.graphql +12 -0
- package/src/misc/graphql/server/apex.mutations.graphql +23 -0
- package/src/misc/graphql/server/apex.queries.graphql +36 -0
- package/src/misc/graphql/server/apex.types.disciplines.graphql +4 -0
- package/src/misc/graphql/server/apex.types.tags.graphql +4 -0
- package/src/misc/graphql/server/shared.enums.graphql +112 -0
- package/src/misc/graphql/server/shared.inputs.misc.graphql +101 -0
- package/src/misc/graphql/server/shared.queries.graphql +35 -0
- package/src/misc/graphql/server/shared.types.disciplines.graphql +8 -0
- package/src/misc/graphql/server/shared.types.events.graphql +39 -0
- package/src/misc/graphql/server/shared.types.location.graphql +17 -0
- package/src/misc/graphql/server/shared.types.misc.graphql +120 -0
- package/src/misc/graphql/server/shared.types.related.graphql +10 -0
- package/src/misc/graphql/server/shared.types.relatedAffiliation.graphql +7 -0
- package/src/misc/graphql/server/shared.types.relatedEvent.graphql +7 -0
- package/src/misc/graphql/server/shared.types.relatedFellowships.graphql +7 -0
- package/src/misc/graphql/server/shared.types.relatedNews.graphql +7 -0
- package/src/misc/graphql/server/shared.types.relatedPeople.graphql +6 -0
- package/src/misc/graphql/server/shared.types.relatedProject.graphql +7 -0
- package/src/misc/graphql/server/shared.types.relatedPublications.graphql +6 -0
- package/src/misc/graphql/server/shared.types.socials.graphql +22 -0
- package/src/misc/graphql/server/shared.types.tags.graphql +11 -0
- package/src/misc/graphql/server/website.mutations.graphql +4 -0
- package/src/misc/models/disciplines.ts +116 -0
- package/src/misc/models/location.ts +136 -0
- package/src/misc/models/organizers.ts +13 -0
- package/src/misc/models/related.ts +123 -0
- package/src/misc/models/relatedEvents.ts +16 -0
- package/src/misc/models/relatedFellowships.ts +7 -0
- package/src/misc/models/relatedNews.ts +13 -0
- package/src/misc/models/relatedPeople.ts +8 -0
- package/src/misc/models/relatedProject.ts +14 -0
- package/src/misc/models/relatedPublications.ts +14 -0
- package/src/misc/models/socials.ts +133 -0
- package/src/misc/models/sponsor.ts +13 -0
- package/src/misc/models/tags.ts +116 -0
- package/src/misc/models/taxonomy.ts +1 -0
- package/src/model.ts +7 -0
- package/src/news/graphql/client/query.get.news.gql +128 -0
- package/src/news/graphql/client/query.list.news.gql +35 -0
- package/src/news/graphql/server/share.types.news.graphql +27 -0
- package/src/news/models/news.ts +257 -0
- package/src/people/graphql/client/query.get.people.gql +173 -0
- package/src/people/graphql/client/query.get.users.gql +0 -0
- package/src/people/graphql/client/query.list.people.gql +55 -0
- package/src/people/graphql/client/query.list.users.gql +31 -0
- package/src/people/graphql/server/apex.inputs.consent.graphql +9 -0
- package/src/people/graphql/server/apex.inputs.groups.graphql +8 -0
- package/src/people/graphql/server/apex.inputs.vintage.graphql +6 -0
- package/src/people/graphql/server/shared.types.consent.graphql +9 -0
- package/src/people/graphql/server/shared.types.groups.graphql +8 -0
- package/src/people/graphql/server/shared.types.people.graphql +29 -0
- package/src/people/graphql/server/shared.types.position.graphql +6 -0
- package/src/people/graphql/server/shared.types.users.graphql +17 -0
- package/src/people/graphql/server/shared.types.vintage.graphql +6 -0
- package/src/people/models/consent.ts +82 -0
- package/src/people/models/discussants.ts +9 -0
- package/src/people/models/experiences.ts +38 -0
- package/src/people/models/fellows.ts +12 -0
- package/src/people/models/groups.ts +58 -0
- package/src/people/models/people.ts +244 -0
- package/src/people/models/position.ts +62 -0
- package/src/people/models/speakers.ts +9 -0
- package/src/people/models/users.ts +252 -0
- package/src/people/models/vintage.ts +124 -0
- package/src/projects/graphql/client/query.get.projects.gql +166 -0
- package/src/projects/graphql/client/query.list.projects.gql +33 -0
- package/src/projects/graphql/server/shared.types.projects.graphql +29 -0
- package/src/projects/models/projects.ts +249 -0
- package/src/publications/graphql/client/query.get.publications.gql +169 -0
- package/src/publications/graphql/client/query.list.publications.gql +35 -0
- package/src/publications/graphql/server/shared.types.publications.graphql +34 -0
- package/src/publications/models/article.ts +262 -0
- package/src/publications/models/publications.ts +306 -0
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"items": [
|
|
3
|
+
{},
|
|
4
|
+
{},
|
|
5
|
+
{},
|
|
6
|
+
{},
|
|
7
|
+
{},
|
|
8
|
+
{},
|
|
9
|
+
{},
|
|
10
|
+
{},
|
|
11
|
+
{},
|
|
12
|
+
{},
|
|
13
|
+
{},
|
|
14
|
+
{},
|
|
15
|
+
{},
|
|
16
|
+
{},
|
|
17
|
+
{},
|
|
18
|
+
{},
|
|
19
|
+
{},
|
|
20
|
+
{},
|
|
21
|
+
{},
|
|
22
|
+
{}
|
|
23
|
+
],
|
|
24
|
+
"itemsPerPage": 20,
|
|
25
|
+
"itemsPerPageArray": [
|
|
26
|
+
20,
|
|
27
|
+
40,
|
|
28
|
+
60,
|
|
29
|
+
80,
|
|
30
|
+
100
|
|
31
|
+
],
|
|
32
|
+
"filtersCount": 0,
|
|
33
|
+
"views": {
|
|
34
|
+
"rows": {
|
|
35
|
+
"name": "rows",
|
|
36
|
+
"icon": "view-list",
|
|
37
|
+
"perPage": {
|
|
38
|
+
"options": [
|
|
39
|
+
9,
|
|
40
|
+
12,
|
|
41
|
+
16
|
|
42
|
+
],
|
|
43
|
+
"default": 9
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"dense": {
|
|
47
|
+
"default": true,
|
|
48
|
+
"name": "dense",
|
|
49
|
+
"icon": "land-rows-horizontal",
|
|
50
|
+
"perPage": {
|
|
51
|
+
"options": [
|
|
52
|
+
20,
|
|
53
|
+
40,
|
|
54
|
+
60,
|
|
55
|
+
80,
|
|
56
|
+
100
|
|
57
|
+
],
|
|
58
|
+
"default": 20
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"sort": {
|
|
63
|
+
"nameasc": {
|
|
64
|
+
"icon": "sort-alphabetical-ascending",
|
|
65
|
+
"text": "by-name-from-a-to-z",
|
|
66
|
+
"value": [
|
|
67
|
+
"lastname",
|
|
68
|
+
1
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
"namedesc": {
|
|
72
|
+
"icon": "sort-alphabetical-descending",
|
|
73
|
+
"text": "by-name-from-z-to-a",
|
|
74
|
+
"value": [
|
|
75
|
+
"lastname",
|
|
76
|
+
-1
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
"vintagedesc": {
|
|
80
|
+
"icon": "sort-calendar-descending",
|
|
81
|
+
"text": "by-vintage-from-old-to-recent",
|
|
82
|
+
"value": [
|
|
83
|
+
"groups.vintage.year",
|
|
84
|
+
-1
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
"vintageasc": {
|
|
88
|
+
"icon": "sort-calendar-descending",
|
|
89
|
+
"text": "by-vintage-from-recent-to-old",
|
|
90
|
+
"value": [
|
|
91
|
+
"groups.vintage.year",
|
|
92
|
+
1
|
|
93
|
+
],
|
|
94
|
+
"default": true
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"view": {
|
|
98
|
+
"default": true,
|
|
99
|
+
"name": "dense",
|
|
100
|
+
"icon": "land-rows-horizontal",
|
|
101
|
+
"perPage": {
|
|
102
|
+
"options": [
|
|
103
|
+
20,
|
|
104
|
+
40,
|
|
105
|
+
60,
|
|
106
|
+
80,
|
|
107
|
+
100
|
|
108
|
+
],
|
|
109
|
+
"default": 20
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"filters": {
|
|
113
|
+
"groups": {
|
|
114
|
+
"type": "Select"
|
|
115
|
+
},
|
|
116
|
+
"vintage": {
|
|
117
|
+
"type": "Select",
|
|
118
|
+
"show": {
|
|
119
|
+
"default": false,
|
|
120
|
+
"switchIf": [
|
|
121
|
+
{
|
|
122
|
+
"groups": "fellows"
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
"disjonctive": false
|
|
126
|
+
},
|
|
127
|
+
"multiple": true
|
|
128
|
+
},
|
|
129
|
+
"programs": {
|
|
130
|
+
"type": "Select",
|
|
131
|
+
"show": {
|
|
132
|
+
"default": false,
|
|
133
|
+
"switchIf": [
|
|
134
|
+
{
|
|
135
|
+
"groups": "fellows"
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
"disjonctive": false
|
|
139
|
+
},
|
|
140
|
+
"multiple": true
|
|
141
|
+
},
|
|
142
|
+
"disciplines": {
|
|
143
|
+
"type": "Select",
|
|
144
|
+
"show": {
|
|
145
|
+
"default": false,
|
|
146
|
+
"switchIf": [
|
|
147
|
+
{
|
|
148
|
+
"groups": "fellows"
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
"disjonctive": false
|
|
152
|
+
},
|
|
153
|
+
"multiple": true
|
|
154
|
+
},
|
|
155
|
+
"member": {
|
|
156
|
+
"type": "Select",
|
|
157
|
+
"show": {
|
|
158
|
+
"default": false,
|
|
159
|
+
"switchIf": [
|
|
160
|
+
{
|
|
161
|
+
"groups": "fellows"
|
|
162
|
+
}
|
|
163
|
+
],
|
|
164
|
+
"disjonctive": false
|
|
165
|
+
},
|
|
166
|
+
"multiple": true
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"limit": 20,
|
|
170
|
+
"sortBy": [
|
|
171
|
+
"groups.vintage.year"
|
|
172
|
+
],
|
|
173
|
+
"sortDesc": [
|
|
174
|
+
1
|
|
175
|
+
]
|
|
176
|
+
}
|
package/index.ts
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import events from "./dist/events"
|
|
2
|
+
import news from "./dist/news"
|
|
3
|
+
import people from "./dist/people"
|
|
4
|
+
import projects from "./dist/projects"
|
|
5
|
+
import fellowships from "./dist/fellowships"
|
|
6
|
+
import publications from "./dist/publications"
|
|
7
|
+
import workExperience from "./dist/workExperience"
|
|
8
|
+
import listEvents from "./dist/list/events"
|
|
9
|
+
import listNews from "./dist/list/news"
|
|
10
|
+
import listPeople from "./dist/list/people"
|
|
11
|
+
import listProjects from "./dist/list/projects"
|
|
12
|
+
import listFellowships from "./dist/list/fellowships"
|
|
13
|
+
import listPublications from "./dist/list/publications"
|
|
14
|
+
import listApps from "./dist/list/apps"
|
|
15
|
+
import listExperiences from "./dist/list/workExperience"
|
|
16
|
+
import formEvents from "./dist/form/events"
|
|
17
|
+
import formNews from "./dist/form/news"
|
|
18
|
+
import formPeople from "./dist/form/people"
|
|
19
|
+
import formProjects from "./dist/form/projects"
|
|
20
|
+
import formFellowships from "./dist/form/fellowships"
|
|
21
|
+
import formPublications from "./dist/form/publications"
|
|
22
|
+
import formApps from "./dist/form/apps"
|
|
23
|
+
import formExperiences from "./dist/form/workExperience"
|
|
24
|
+
import apps from "./dist/apps"
|
|
25
|
+
import {
|
|
26
|
+
templates,
|
|
27
|
+
ConfigValue,
|
|
28
|
+
Form,
|
|
29
|
+
Model,
|
|
30
|
+
ModuleType,
|
|
31
|
+
Sort,
|
|
32
|
+
Views,
|
|
33
|
+
formType,
|
|
34
|
+
} from "./src"
|
|
35
|
+
|
|
36
|
+
export {
|
|
37
|
+
templates,
|
|
38
|
+
apps,
|
|
39
|
+
events,
|
|
40
|
+
news,
|
|
41
|
+
people,
|
|
42
|
+
projects,
|
|
43
|
+
fellowships,
|
|
44
|
+
publications,
|
|
45
|
+
workExperience,
|
|
46
|
+
listEvents,
|
|
47
|
+
listNews,
|
|
48
|
+
listPeople,
|
|
49
|
+
listProjects,
|
|
50
|
+
listFellowships,
|
|
51
|
+
listPublications,
|
|
52
|
+
listApps,
|
|
53
|
+
listExperiences,
|
|
54
|
+
formEvents,
|
|
55
|
+
formNews,
|
|
56
|
+
formPeople,
|
|
57
|
+
formProjects,
|
|
58
|
+
formFellowships,
|
|
59
|
+
formPublications,
|
|
60
|
+
formApps,
|
|
61
|
+
formExperiences,
|
|
62
|
+
}
|
|
63
|
+
export type { Form, Sort, Views, ConfigValue, Model, ModuleType, formType }
|
package/lib/README.md
ADDED
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
# Type Generation Scripts
|
|
2
|
+
|
|
3
|
+
This directory contains scripts for generating type definitions, schemas, and GraphQL client files for the Paris IAS data management system.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
The generation process consists of three main tasks:
|
|
8
|
+
|
|
9
|
+
1. **Module Generation** (`generate.ts`) - Creates type modules and configurations
|
|
10
|
+
2. **Schema Generation** (`buildSchemas.ts`) - Builds GraphQL schemas and resolver lists
|
|
11
|
+
3. **GraphQL Client Generation** (`buildClientGraphQL.ts`) - Copies and organizes client GraphQL files
|
|
12
|
+
|
|
13
|
+
## Unified Generation
|
|
14
|
+
|
|
15
|
+
### Main Command
|
|
16
|
+
```bash
|
|
17
|
+
npm run generate
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
This runs the unified generation script (`generateAll.ts`) that orchestrates all three tasks and provides a single consolidated overview instead of three separate outputs.
|
|
21
|
+
|
|
22
|
+
### Individual Commands
|
|
23
|
+
If you need to run specific tasks:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm run generate:modules # Module generation only
|
|
27
|
+
npm run generate:schemas # Schema generation only
|
|
28
|
+
npm run generate:client # GraphQL client generation only
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Generated Output
|
|
32
|
+
|
|
33
|
+
The unified generation provides a clean summary:
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
============================================================
|
|
37
|
+
📊 GENERATION SUMMARY
|
|
38
|
+
============================================================
|
|
39
|
+
🕐 Total Duration: 3001ms
|
|
40
|
+
📈 Success Rate: 3/3 tasks completed
|
|
41
|
+
|
|
42
|
+
✅ Completed Tasks:
|
|
43
|
+
• Generate Modules: 14/14 modules (1215ms)
|
|
44
|
+
• Generate Schemas: 2 schemas + resolvers (1026ms)
|
|
45
|
+
• Generate GraphQL Client: 31 files, 12 types (760ms)
|
|
46
|
+
|
|
47
|
+
🎉 All generation tasks completed successfully!
|
|
48
|
+
============================================================
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Generated Structure
|
|
52
|
+
|
|
53
|
+
After running the generation, the following structure is created:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
dist/
|
|
57
|
+
├── form/ # Module form configurations
|
|
58
|
+
├── list/ # Module list configurations
|
|
59
|
+
├── graphql/
|
|
60
|
+
│ ├── schemas/ # Generated GraphQL schemas
|
|
61
|
+
│ │ ├── schema.website.graphql
|
|
62
|
+
│ │ ├── schema.apex.graphql
|
|
63
|
+
│ │ ├── website-resolvers-list.json
|
|
64
|
+
│ │ └── apex-resolvers-list.json
|
|
65
|
+
│ └── client/ # GraphQL client operations (minimal output)
|
|
66
|
+
│ ├── action/
|
|
67
|
+
│ │ ├── query.get.action.gql
|
|
68
|
+
│ │ └── query.list.action.gql
|
|
69
|
+
│ ├── publications/
|
|
70
|
+
│ │ ├── query.get.publications.gql
|
|
71
|
+
│ │ └── query.list.publications.gql
|
|
72
|
+
│ └── ... (other types)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**Note**: Only `.gql` files are generated since client applications import them directly.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
# GraphQL Client Builder
|
|
80
|
+
|
|
81
|
+
This directory contains the `buildClientGraphQL.ts` script that automatically copies and organizes all GraphQL client operations from the source directories to the distribution folder.
|
|
82
|
+
|
|
83
|
+
## Overview
|
|
84
|
+
|
|
85
|
+
The script processes all GraphQL client files located in `src/[type]/graphql/client/` directories and copies them to `dist/graphql/client/[type]/` with proper TypeScript support.
|
|
86
|
+
|
|
87
|
+
## Features
|
|
88
|
+
|
|
89
|
+
- **Automatic Discovery**: Finds all `.gql` and `.graphql` files in client directories
|
|
90
|
+
- **Organized Structure**: Maintains type-based organization in the dist folder
|
|
91
|
+
- **Minimal Output**: Only copies essential `.gql` files (no unnecessary TypeScript files)
|
|
92
|
+
- **Direct Import Ready**: Optimized for direct `.gql` file imports in client applications
|
|
93
|
+
- **Operation Detection**: Identifies query, mutation, and subscription operations
|
|
94
|
+
|
|
95
|
+
## Usage
|
|
96
|
+
|
|
97
|
+
### Build Script
|
|
98
|
+
```bash
|
|
99
|
+
npm run build:client-graphql
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Manual Execution
|
|
103
|
+
```bash
|
|
104
|
+
npx tsx lib/buildClientGraphQL.ts
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Programmatic Usage
|
|
108
|
+
```typescript
|
|
109
|
+
import { buildClientGraphQL } from './lib/buildClientGraphQL.ts'
|
|
110
|
+
|
|
111
|
+
// Use default configuration
|
|
112
|
+
buildClientGraphQL()
|
|
113
|
+
|
|
114
|
+
// Use custom configuration
|
|
115
|
+
buildClientGraphQL({
|
|
116
|
+
srcDir: './custom/src',
|
|
117
|
+
distDir: './custom/dist',
|
|
118
|
+
extensions: ['.gql'],
|
|
119
|
+
generateDeclarations: false
|
|
120
|
+
})
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Generated Structure
|
|
124
|
+
|
|
125
|
+
After running the script, the following structure is created:
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
dist/graphql/client/
|
|
129
|
+
├── index.ts # Main export file
|
|
130
|
+
├── action/
|
|
131
|
+
│ ├── index.ts # Action type exports
|
|
132
|
+
│ ├── query.get.action.gql
|
|
133
|
+
│ ├── query.get.action.d.ts
|
|
134
|
+
│ └── ...
|
|
135
|
+
├── publications/
|
|
136
|
+
│ ├── index.ts # Publications type exports
|
|
137
|
+
│ ├── query.get.publications.gql
|
|
138
|
+
│ ├── query.get.publications.d.ts
|
|
139
|
+
│ └── ...
|
|
140
|
+
└── ... (other types)
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Client Usage
|
|
144
|
+
|
|
145
|
+
Once built, client applications can import GraphQL operations like this:
|
|
146
|
+
|
|
147
|
+
```typescript
|
|
148
|
+
// Import specific operations
|
|
149
|
+
import { GET_PUBLICATIONS, LIST_PUBLICATIONS } from '@paris-ias/data/dist/graphql/client/publications'
|
|
150
|
+
|
|
151
|
+
// Import all operations for a type
|
|
152
|
+
import * as publicationsQueries from '@paris-ias/data/dist/graphql/client/publications'
|
|
153
|
+
|
|
154
|
+
// Import all operations
|
|
155
|
+
import * as graphqlClient from '@paris-ias/data/dist/graphql/client'
|
|
156
|
+
|
|
157
|
+
// Use with Apollo Client, Relay, or other GraphQL clients
|
|
158
|
+
const client = new ApolloClient({...})
|
|
159
|
+
const result = await client.query({
|
|
160
|
+
query: GET_PUBLICATIONS,
|
|
161
|
+
variables: { appId: 'iea', itemId: '123' }
|
|
162
|
+
})
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Configuration Options
|
|
166
|
+
|
|
167
|
+
| Option | Type | Default | Description |
|
|
168
|
+
|--------|------|---------|-------------|
|
|
169
|
+
| `srcDir` | string | `../src` | Source directory containing type folders |
|
|
170
|
+
| `distDir` | string | `../dist/graphql/client` | Destination directory for built files |
|
|
171
|
+
| `extensions` | string[] | `['.gql', '.graphql']` | File extensions to process |
|
|
172
|
+
| `generateDeclarations` | boolean | `false` | Whether to generate TypeScript declaration files (disabled for direct .gql imports) |
|
|
173
|
+
| `generateIndexFiles` | boolean | `false` | Whether to generate TypeScript index files (disabled for direct .gql imports) |
|
|
174
|
+
|
|
175
|
+
## Integration with Build Process
|
|
176
|
+
|
|
177
|
+
The script is integrated into the main build process:
|
|
178
|
+
|
|
179
|
+
1. `npm run clean` - Removes the dist directory
|
|
180
|
+
2. `npm run generate` - Generates type definitions and schemas
|
|
181
|
+
3. `npm run build:client-graphql` - Builds GraphQL client files
|
|
182
|
+
4. `npm run build` - Runs all build steps
|
|
183
|
+
|
|
184
|
+
## File Naming Conventions
|
|
185
|
+
|
|
186
|
+
The script recognizes the following naming patterns:
|
|
187
|
+
- `query.*` - GraphQL queries
|
|
188
|
+
- `mutation.*` or `*.mutations.*` - GraphQL mutations
|
|
189
|
+
- `subscription.*` - GraphQL subscriptions
|
|
190
|
+
|
|
191
|
+
## Error Handling
|
|
192
|
+
|
|
193
|
+
The script includes comprehensive error handling:
|
|
194
|
+
- Missing directories are reported but don't stop the build
|
|
195
|
+
- File copy errors are logged and re-thrown
|
|
196
|
+
- TypeScript declaration generation errors are handled gracefully
|
|
197
|
+
|
|
198
|
+
## Development
|
|
199
|
+
|
|
200
|
+
To modify the build process:
|
|
201
|
+
|
|
202
|
+
1. Edit `lib/buildClientGraphQL.ts`
|
|
203
|
+
2. Test with `npm run build:client-graphql`
|
|
204
|
+
3. Check the generated files in `dist/graphql/client/`
|
|
205
|
+
|
|
206
|
+
The script is designed to be extensible and can be modified to support additional file types, custom transformations, or different organization patterns.
|