@commitspark/graphql-api 0.10.0 → 0.11.1

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.
Files changed (50) hide show
  1. package/CHANGELOG.md +67 -2
  2. package/README.md +96 -85
  3. package/dist/graphql/field-resolver/entry-reference-resolver.d.ts +3 -2
  4. package/dist/graphql/field-resolver/entry-reference-resolver.js.map +1 -1
  5. package/dist/graphql/field-resolver/field-default-value-resolver.d.ts +2 -2
  6. package/dist/graphql/field-resolver/field-default-value-resolver.js.map +1 -1
  7. package/dist/graphql/field-resolver/fieldResolver.d.ts +2 -2
  8. package/dist/graphql/field-resolver/union-value-resolver.d.ts +2 -2
  9. package/dist/graphql/field-resolver/union-value-resolver.js.map +1 -1
  10. package/dist/graphql/queries-mutations-generator.service.d.ts +6 -6
  11. package/dist/graphql/queries-mutations-generator.service.js +6 -6
  12. package/dist/graphql/queries-mutations-generator.service.js.map +1 -1
  13. package/dist/graphql/resolver-generators/mutation-create-resolver-generator.d.ts +3 -2
  14. package/dist/graphql/resolver-generators/mutation-create-resolver-generator.js +1 -1
  15. package/dist/graphql/resolver-generators/mutation-create-resolver-generator.js.map +1 -1
  16. package/dist/graphql/resolver-generators/mutation-delete-resolver-generator.d.ts +3 -2
  17. package/dist/graphql/resolver-generators/mutation-delete-resolver-generator.js +1 -1
  18. package/dist/graphql/resolver-generators/mutation-delete-resolver-generator.js.map +1 -1
  19. package/dist/graphql/resolver-generators/mutation-update-resolver-generator.d.ts +3 -2
  20. package/dist/graphql/resolver-generators/mutation-update-resolver-generator.js +1 -1
  21. package/dist/graphql/resolver-generators/mutation-update-resolver-generator.js.map +1 -1
  22. package/dist/graphql/resolver-generators/object-type-field-default-value-resolver-generator.d.ts +2 -2
  23. package/dist/graphql/resolver-generators/object-type-field-default-value-resolver-generator.js.map +1 -1
  24. package/dist/graphql/resolver-generators/query-all-resolver-generator.d.ts +3 -2
  25. package/dist/graphql/resolver-generators/query-all-resolver-generator.js.map +1 -1
  26. package/dist/graphql/resolver-generators/query-by-id-resolver-generator.d.ts +3 -2
  27. package/dist/graphql/resolver-generators/query-by-id-resolver-generator.js.map +1 -1
  28. package/dist/graphql/schema-utils/union-type-util.d.ts +2 -2
  29. package/dist/index.d.ts +2 -2
  30. package/dist/index.js.map +1 -1
  31. package/dist/persistence/persistence.service.d.ts +4 -8
  32. package/dist/persistence/persistence.service.js +8 -8
  33. package/dist/persistence/persistence.service.js.map +1 -1
  34. package/dist/tsconfig.build.tsbuildinfo +1 -1
  35. package/package.json +3 -3
  36. package/src/graphql/field-resolver/entry-reference-resolver.ts +5 -7
  37. package/src/graphql/field-resolver/field-default-value-resolver.ts +4 -4
  38. package/src/graphql/field-resolver/fieldResolver.ts +2 -2
  39. package/src/graphql/field-resolver/union-value-resolver.ts +5 -5
  40. package/src/graphql/queries-mutations-generator.service.ts +17 -17
  41. package/src/graphql/resolver-generators/mutation-create-resolver-generator.ts +9 -11
  42. package/src/graphql/resolver-generators/mutation-delete-resolver-generator.ts +7 -10
  43. package/src/graphql/resolver-generators/mutation-update-resolver-generator.ts +9 -12
  44. package/src/graphql/resolver-generators/object-type-field-default-value-resolver-generator.ts +5 -5
  45. package/src/graphql/resolver-generators/query-all-resolver-generator.ts +4 -6
  46. package/src/graphql/resolver-generators/query-by-id-resolver-generator.ts +4 -6
  47. package/src/graphql/schema-generator.service.ts +2 -2
  48. package/src/graphql/schema-utils/union-type-util.ts +2 -2
  49. package/src/index.ts +2 -2
  50. package/src/persistence/persistence.service.ts +12 -25
package/CHANGELOG.md CHANGED
@@ -1,124 +1,188 @@
1
1
  # Changelog
2
+
2
3
  All notable changes to this project will be documented in this file.
3
4
 
4
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
7
 
7
- ## [0.10.0] - 2024-06-15
8
+ ## [0.11.1] - 2024-12-29
9
+
8
10
  ### Added
11
+
12
+ - Export API response types
13
+
14
+ ### Changed
15
+
16
+ - Upgrade dependencies
17
+
18
+ ## [0.11.0] - 2024-08-17
19
+
20
+ ### Changed
21
+
22
+ - Upgrade to `@commitspark/git-adapter` 0.13.0
23
+
24
+ ## [0.10.0] - 2024-06-15
25
+
26
+ ### Added
27
+
9
28
  - Add referential integrity by tracking and validating references between entries
10
29
  - Add support of partial updates
11
30
 
12
31
  ### Fixed
32
+
13
33
  - [#18](https://github.com/commitspark/graphql-api/issues/18), [#25](https://github.com/commitspark/graphql-api/issues/25)
14
34
  Fix handling of entries that only have an `id` field
15
35
 
16
36
  ### Changed
37
+
17
38
  - Return default data where possible when entry data is incomplete
18
39
  - Improve content retrieval performance
19
40
 
20
41
  ## [0.9.4] - 2023-11-14
42
+
21
43
  ### Fixed
44
+
22
45
  - Fix invalid schema built when running under Next.js 14
23
46
 
24
47
  ## [0.9.3] - 2023-09-06
48
+
25
49
  ### Fixed
50
+
26
51
  - Fix failure to resolve array of non-@Entry union types that is null
27
52
 
28
53
  ### Changed
54
+
29
55
  - Update dependencies
30
56
 
31
57
  ## [0.9.2] - 2023-07-22
58
+
32
59
  ### Fixed
60
+
33
61
  - Fix documentation to match implementation
34
62
  - Fix missing numeric character permission in entry ID validation regex
35
63
 
36
64
  ## [0.9.1] - 2023-07-09
65
+
37
66
  ### Fixed
67
+
38
68
  - Fix broken NPM package build
39
69
 
40
70
  ## [0.9.0] - 2023-07-09
71
+
41
72
  ### Changed
73
+
42
74
  - Improve schema formatting
43
75
  - Expose entry ID as argument of "create" mutation instead of automatic ID generation
44
76
  - Check ID of entry before executing an update, delete mutation
45
77
  - Update dependencies
46
78
 
47
79
  ### Fixed
80
+
48
81
  - [#32](https://github.com/commitspark/graphql-api/issues/32) Fix memory leak triggered by API calls
49
82
 
50
83
  ## [0.8.0] - 2023-06-17
84
+
51
85
  ### Fixed
86
+
52
87
  - [#26](https://github.com/commitspark/graphql-api/issues/26) Querying optional reference field with null value causes
53
88
  exception
54
89
 
55
90
  ## [0.7.0] - 2023-05-12
91
+
56
92
  ### Changed
93
+
57
94
  - Rename organization
58
95
  - Remove deprecated code
59
96
 
60
97
  ## [0.6.1] - 2023-05-07
98
+
61
99
  ### Changed
100
+
62
101
  - Improve documentation
63
102
 
64
103
  ## [0.6.0] - 2023-04-27
104
+
65
105
  ### Changed
106
+
66
107
  - Enable strict TypeScript for improved type safety
67
108
  - Update packages to address NPM security audit
68
109
 
69
110
  ### Fixed
70
- - [#23](https://github.com/commitspark/graphql-api/issues/23) Data of unions with non-Entry members is
111
+
112
+ - [#23](https://github.com/commitspark/graphql-api/issues/23) Data of unions with non-Entry members is
71
113
  not discernible after serialization
72
114
 
73
115
  ## [0.5.4] - 2023-03-15
116
+
74
117
  ### Changed
118
+
75
119
  - Remove dependency injection package to support bundling with webpack & co.
76
120
  - Upgrade to Apollo Server 4.5
77
121
 
78
122
  ## [0.5.3] - 2023-03-12
123
+
79
124
  ### Changed
125
+
80
126
  - Improve GraphQL endpoint type definition
81
127
 
82
128
  ## [0.5.2] - 2022-11-14
129
+
83
130
  ### Changed
131
+
84
132
  - Update dependencies
85
133
  - Upgrade to Apollo Server 4
86
134
 
87
135
  ## [0.5.1] - 2022-11-04
136
+
88
137
  ### Changed
138
+
89
139
  - Clean up unused dependencies
90
140
  - Extensive update of README
91
141
 
92
142
  ### Fixed
143
+
93
144
  - Fix omission of providing preceding commit hash when requesting a new commit from Git adapter
94
145
 
95
146
  ## [0.5.0] - 2022-11-01
147
+
96
148
  ### Changed
149
+
97
150
  - Move NPM package to organization namespace
98
151
  - Update to organization-based `git-adapter`
99
152
 
100
153
  ## [0.4.1] - 2022-10-25
154
+
101
155
  ### Changed
156
+
102
157
  - Update to Git Adapter interface 0.4.0
103
158
 
104
159
  ## [0.4.0] - 2022-10-25
160
+
105
161
  ### Changed
162
+
106
163
  - Move responsibility for Git adapter lifecycle out of library
107
164
  - Make type query use commit hash for better performance
108
165
 
109
166
  ## [0.3.0] - 2022-10-24
167
+
110
168
  ### Changed
169
+
111
170
  - Drop NestJS in favor of awilix due to https://github.com/nestjs/nest/issues/9622
112
171
 
113
172
  ## [0.2.1] - 2022-10-11
173
+
114
174
  ### Fixed
175
+
115
176
  - Export signature of `ApiService`
116
177
 
117
178
  ### Changed
179
+
118
180
  - Move example application into [separate repository](https://github.com/commitspark/example-code-serverless)
119
181
 
120
182
  ## [0.2.0] - 2022-10-07
183
+
121
184
  ### Changed
185
+
122
186
  - Move GitLab (SaaS) implementation into [separate repository](https://github.com/commitspark/git-adapter-gitlab)
123
187
  - Refactor code to be used as library
124
188
  - Move application-specific code to example directory
@@ -128,4 +192,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
128
192
  ## [0.1.0] - 2022-07-15
129
193
 
130
194
  ### Added
195
+
131
196
  - Initial release
package/README.md CHANGED
@@ -1,61 +1,31 @@
1
1
  # Introduction
2
2
 
3
- **This library dynamically generates a GraphQL API that allows reading and writing structured text content to and from a
4
- Git repository.**
3
+ [Commitspark](https://commitspark.com) is a set of tools to manage structured data with Git through a GraphQL API.
5
4
 
6
- Queries and mutations offered by the generated API are determined by a vanilla GraphQL type definition file inside the
7
- Git repository.
5
+ This library dynamically generates the GraphQL API that allows reading and writing structured data (entries) to and from
6
+ a Git repository.
8
7
 
9
- Content is stored using plain YAML text files in the same Git repository. No other data store or configuration is
10
- needed.
8
+ Queries and mutations offered by the generated API are determined by a standard GraphQL type definition file (schema)
9
+ inside the Git repository.
11
10
 
12
- ---
11
+ Entries (data) are stored using plain YAML text files in the same Git repository. No other data store is needed.
13
12
 
14
- *Commitspark is in tech-preview, i.e. it is not yet feature-complete, missing some error handling and tests, and may
15
- implement breaking changes before a first production-ready release.*
16
-
17
- # Usage
18
-
19
- Use this library to query structured content from a Git repository via GraphQL e.g. in order to fill frontends such as a
20
- Next.js-based website with content. The generated GraphQL API is similar to those offered by headless content management
21
- systems (CMS), only that content comes from a Git repository and not a proprietary storage or API.
22
-
23
- To edit content, either use the [Commitspark user interface](https://commitspark.com) or execute the library's generated
24
- GraphQL mutations yourself. (Or if you know what you're doing, you could even edit the YAML content files directly in a
25
- repository).
26
-
27
- To change the content model, simply modify the GraphQL type definition (schema) file. For details, see below.
28
-
29
- # Running the Commitspark library
13
+ # Running the GraphQL API
30
14
 
31
15
  There are two common ways to run this library:
32
16
 
33
17
  1. By making GraphQL calls directly against the library as a code dependency in your own JavaScript / TypeScript /
34
18
  NodeJS application (NPM package name `@commitspark/graphql-api`)
35
- 2. By making GraphQL calls over HTTP to the library wrapped in
36
- a webserver or Lambda function of choice
37
- ([NodeJS Express server example](https://github.com/commitspark/example-http-express),
19
+ 2. By making GraphQL calls over HTTP to the library wrapped in a webserver or Lambda function of choice
20
+ (see the [NodeJS Express server example](https://github.com/commitspark/example-http-express) or
38
21
  [Lambda function example](https://github.com/commitspark/example-code-serverless))
39
22
 
40
- In both cases, it is recommended to use a dedicated Git repository for content and not use the same repository as used
41
- for application code. See "Git repository hosting" below on where this content repository can be located.
42
-
43
- # Getting started
44
-
45
- If you're new to Commitspark, the quickest way to see Commitspark in action is as follows:
46
-
47
- 1. [Copy the example Git content repository](https://github.com/commitspark/example-content-website/generate)
48
- 2. [Copy the example Next.js application repository](https://github.com/commitspark/example-nextjs/generate)
49
- 3. In the application repository, follow the simple
50
- [README](https://github.com/commitspark/example-nextjs/blob/main/README.md) steps to point Next.js to your content
51
- repository
52
-
53
23
  # Git repository hosting
54
24
 
55
- Commitspark follows an adapter pattern, so it can read from and write to Git repositories in various places, either
56
- hosted or locally. When using the library, pass an adapter instance as needed by your project.
25
+ This library follows an adapter pattern to allow reading from and writing to Git repositories in various locations,
26
+ either hosted or locally. When calling the library, pass an adapter instance as needed by your project.
57
27
 
58
- The following adapters exist:
28
+ The following pre-built adapters exist:
59
29
 
60
30
  | Adapter | Description | NPM package name |
61
31
  |---------------------------------------------------------------------|------------------------------------------------------------|---------------------------------------|
@@ -77,28 +47,30 @@ argument in library calls to a
77
47
  * branch name, or
78
48
  * tag name (light or regular)
79
49
 
80
- This enables great flexibility, e.g. to retrieve always the same content of a specific (historic) commit, to have
81
- different branches with different content, or to retrieve content by tag such as reviewed content.
50
+ This enables great flexibility, e.g. to retrieve always the same entries of a specific (historic) commit, to have
51
+ different branches with different entries, or to retrieve entries by tag such as one that marks the latest approved
52
+ data in a repository.
82
53
 
83
54
  ## Obtaining the generated GraphQL schema
84
55
 
85
- Commitspark dynamically extends the GraphQL schema file's content model at runtime with additional types as well as
86
- queries and mutations. This extended schema can be retrieved by calling `getSchema()`.
56
+ At runtime, Commitspark dynamically extends the GraphQL schema found in the schema file with additional
57
+ types as well as queries and mutations. This extended schema can be retrieved by calling `getSchema()`.
87
58
 
88
- Compared to schema data obtained through GraphQL introspection, the schema returned here also includes directive
89
- declarations and annotations, allowing for development of additional tools that require this information.
59
+ Compared to schema data obtained through GraphQL introspection, the schema returned by this function also includes
60
+ directive declarations and annotations, allowing for development of additional tools that require this information.
90
61
 
91
62
  ## Reading data
92
63
 
93
64
  The `request` argument of `postGraphQL()` expects a conventional GraphQL query and supports query variables as well as
94
- introspection. Commitspark also transparently resolves references between @Entry-annotated content entries (see below),
95
- allowing for retrieval of complex data in a single query.
65
+ introspection. Commitspark also transparently resolves references to other @Entry-annotated GraphQL types (see below),
66
+ allowing for retrieval of complex data in a single query as nested result data.
96
67
 
97
68
  ### Generated queries
98
69
 
99
- For each content type annotated with `@Entry` in the content model (see below), the following queries are generated:
70
+ For each GraphQL type annotated with `@Entry` in the schema (see below), e.g. `MyType`, the following queries are
71
+ generated:
100
72
 
101
- * Query a single entry of a type by ID, e.g. `MyType(id:"..."): MyType`
73
+ * Query a single entry of a type by ID, e.g. `MyType(id: "..."): MyType`
102
74
  * Query all entries of a type, e.g. `allMyTypes: [MyType]`
103
75
 
104
76
  ## Writing data
@@ -108,40 +80,36 @@ well as introspection. Mutation operations work on branch names only and (when s
108
80
  HEAD in the given branch. To avoid race conditions, mutations in calls with multiple mutations are processed
109
81
  sequentially (see the [GraphQL documentation](https://graphql.org/learn/queries/#multiple-fields-in-mutations)).
110
82
 
111
- ### Generated queries
83
+ ### Generated mutations
112
84
 
113
- For each content type annotated with `@Entry` (see below), the following mutations are generated:
85
+ For each GraphQL type annotated with `@Entry` (see below), the following mutations are generated:
114
86
 
115
87
  * Create a single entry of a type, e.g.
116
- `createMyType(id:"...", message:"Commit message", data:{...}): MyType`
88
+ `createMyType(id: "...", message: "Commit message", data: {...}): MyType`
117
89
  * Mutate a single entry of a type by ID, e.g.
118
- `updateMyType(id:"...", message:"Commit message", data:{...}): MyType`
90
+ `updateMyType(id: "...", message: "Commit message", data: {...}): MyType`
119
91
  * Delete a single entry of a type by ID, e.g.
120
- `deleteMyType(id:"...", message:"Commit message"): { id }`
121
-
122
- ## Authenticating with your repository
123
-
124
- Depending on the Git adapter used (see above), an authentication token must be provided. See the corresponding adapter
125
- README for details.
92
+ `deleteMyType(id: "...", message: "Commit message"): { id }`
126
93
 
127
94
  # Technical documentation
128
95
 
129
- ## Content model
96
+ ## Data model
130
97
 
131
- The content model (i.e. schema) is defined in a single GraphQL type definition text file using the
98
+ The data model (i.e. schema) is defined in a single GraphQL type definition text file using the
132
99
  [GraphQL type system](https://graphql.org/learn/schema/).
133
100
 
134
- The schema file must be located at `schema/schema.graphql` inside the Git repository.
101
+ The schema file must be located at `commitspark/schema/schema.graphql` inside the Git repository (unless otherwise
102
+ configured in your Git adapter).
135
103
 
136
- Commitspark currently supports the following data types:
104
+ Commitspark currently supports the following GraphQL types:
137
105
 
138
106
  * `type`
139
107
  * `union`
140
108
  * `enum`
141
109
 
142
- ### Content entries
110
+ ### Data entries
143
111
 
144
- To denote which content type instances are to be given a unique identity for referencing, a directive `@Entry` is
112
+ To denote which data is to be given a unique identity for referencing, a directive `@Entry` is
145
113
  to be declared (this must be done right in the schema file so that the schema remains valid).
146
114
 
147
115
  To define the `@Entry` directive, simply add this line to the schema file:
@@ -150,7 +118,7 @@ To define the `@Entry` directive, simply add this line to the schema file:
150
118
  directive @Entry on OBJECT
151
119
  ```
152
120
 
153
- To promote a content type to Entry, annotate the type as follows:
121
+ To promote a data type to Entry, annotate the type as follows:
154
122
 
155
123
  ```graphql
156
124
  type MyType @Entry {
@@ -161,13 +129,13 @@ type MyType @Entry {
161
129
 
162
130
  **Important:** Any type annotated with `@Entry` must have a field `id` of type `ID!`.
163
131
 
164
- **Note:** Only apply `@Entry` to content types that you actually want to reference or link to from other entries. This
132
+ **Note:** Only apply `@Entry` to data types that you actually want to reference or link to from other entries. This
165
133
  keeps the number of entries low and performance up.
166
134
 
167
- ## Content storage
135
+ ## Entry storage
168
136
 
169
- Content entries, i.e. instances of content types annotated with `@Entry`, are stored as `.yaml` YAML text files inside
170
- a folder `entries` in the repository.
137
+ Entries, i.e. instances of data types annotated with `@Entry`, are stored as `.yaml` YAML text files inside
138
+ a folder `commitspark/entries/` in the repository (unless otherwise configured in your Git adapter).
171
139
 
172
140
  The filename (excluding file extension) constitutes the entry ID.
173
141
 
@@ -175,13 +143,16 @@ Entry files have the following structure:
175
143
 
176
144
  ```yaml
177
145
  metadata:
178
- type: MyType # name of type as defined in your schema
146
+ type: MyType # name of type as defined in your schema
147
+ referencedBy: [ ] # array of entry IDs that hold a reference to this entry
179
148
  data:
180
149
  # ... fields of the type as defined in your schema
181
150
  ```
182
151
 
183
152
  ### Serialization
184
153
 
154
+ #### References
155
+
185
156
  References to types annotated with `@Entry` are stored using a sub-field `id`.
186
157
 
187
158
  For example, consider the following schema:
@@ -197,27 +168,67 @@ type Link @Entry {
197
168
  }
198
169
  ```
199
170
 
200
- An entry for `Link` referencing a `Page` will look like this:
171
+ An entry YAML file for a `Link` with ID `myLink` referencing a `Page` with ID `myPage` will look like this:
201
172
 
202
173
  ```yaml
203
174
  metadata:
204
- type: Link
175
+ type: Link
176
+ referencedBy: [ ]
205
177
  data:
206
- target:
207
- id: "..." # ID of targeted Page
178
+ target:
179
+ id: myPage
180
+ ```
181
+
182
+ The entry YAML file of referenced `Page` `myPage` will then look like this:
183
+
184
+ ```yaml
185
+ metadata:
186
+ type: Page
187
+ referencedBy:
188
+ - myLink
189
+ data: ~
208
190
  ```
209
191
 
210
- # FAQ
192
+ #### Unions
193
+
194
+ Consider the following schema where field `contentElements` is an array of Union type `ContentElement`, allowing
195
+ different concrete types `Hero` or `Text` to be applied:
196
+
197
+ ```graphql
198
+ type Page @Entry {
199
+ id: ID!
200
+ contentElements: [ContentElement!]
201
+ }
202
+
203
+ union ContentElement =
204
+ | Hero
205
+ | Text
211
206
 
212
- * Q: Do I need to run a web server or serverless function to use Commitspark?
207
+ type Hero {
208
+ heroText: String!
209
+ }
210
+
211
+ type Text {
212
+ bodyText: String!
213
+ }
214
+ ```
213
215
 
214
- A: No. You can pass a GraphQL request string directly to the Commitspark library without going through HTTP. This can
215
- be useful e.g. in CI/CD pipelines where you might not want to bring up a server just to execute a GraphQL query.
216
+ During serialization, concrete type instances are represented through an additional nested level of data, using the
217
+ instance's type name with a lowercase first character as field name:
216
218
 
217
- * Q: Do I really need to have two separate repositories for application code and content?
219
+ ```yaml
220
+ metadata:
221
+ type: Page
222
+ referencedBy: [ ]
223
+ data:
224
+ contentElements:
225
+ - hero: # represents type `Hero`
226
+ heroText: "..."
227
+ - text: # represents type `Text`
228
+ bodyText: "..."
229
+ ```
218
230
 
219
- A: No. You can have both in the same repository but depending on how your software and content workflows are
220
- structured, you may have a hard time finding a workflow that works equally well for both domains.
231
+ When querying data through the API, this additional level of nesting is transparently removed and not visible.
221
232
 
222
233
  # License
223
234
 
@@ -1,9 +1,10 @@
1
1
  import { FieldResolver, ResolvedEntryData, FieldResolverContext } from './fieldResolver';
2
2
  import { GraphQLFieldResolver } from 'graphql/type/definition';
3
- import { Entry, PersistenceService } from '../../persistence/persistence.service';
3
+ import { PersistenceService } from '../../persistence/persistence.service';
4
+ import { EntryData } from '@commitspark/git-adapter';
4
5
  export declare class EntryReferenceResolver implements FieldResolver<any> {
5
6
  private readonly persistence;
6
- resolve: GraphQLFieldResolver<any, FieldResolverContext, any, Promise<ResolvedEntryData<Entry | Entry[] | null>>>;
7
+ resolve: GraphQLFieldResolver<any, FieldResolverContext, any, Promise<ResolvedEntryData<EntryData | EntryData[] | null>>>;
7
8
  constructor(persistence: PersistenceService);
8
9
  private resolveFieldValue;
9
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"entry-reference-resolver.js","sourceRoot":"","sources":["../../../src/graphql/field-resolver/entry-reference-resolver.ts"],"names":[],"mappings":";;;AAeA,MAAa,sBAAsB;IAQjC,YAA6B,WAA+B;QAA/B,gBAAW,GAAX,WAAW,CAAoB;QAC1D,IAAI,CAAC,OAAO,GAAG,CACb,UAAU,EACV,IAAS,EACT,OAA6B,EAC7B,IAAI,EACgD,EAAE,CACtD,IAAI,CAAC,iBAAiB,CAAC,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,CAAA;IAC5E,CAAC;IAEO,KAAK,CAAC,iBAAiB,CAC7B,UAAe,EACf,IAAS,EACT,OAA6B,EAC7B,IAAwB,EACxB,WAA8B;QAE9B,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,QAAQ,CAC3C,OAAO,CAAC,UAAU,EAClB,OAAO,CAAC,aAAa,EAAE,EACvB,UAAU,CAAC,EAAE,CACd,CAAA;QAED,uCAAY,KAAK,CAAC,IAAI,KAAE,EAAE,EAAE,KAAK,CAAC,EAAE,IAAE;IACxC,CAAC;CACF;AAjCD,wDAiCC"}
1
+ {"version":3,"file":"entry-reference-resolver.js","sourceRoot":"","sources":["../../../src/graphql/field-resolver/entry-reference-resolver.ts"],"names":[],"mappings":";;;AAaA,MAAa,sBAAsB;IAQjC,YAA6B,WAA+B;QAA/B,gBAAW,GAAX,WAAW,CAAoB;QAC1D,IAAI,CAAC,OAAO,GAAG,CACb,UAAU,EACV,IAAS,EACT,OAA6B,EAC7B,IAAI,EACwD,EAAE,CAC9D,IAAI,CAAC,iBAAiB,CAAC,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,CAAA;IAC5E,CAAC;IAEO,KAAK,CAAC,iBAAiB,CAC7B,UAAe,EACf,IAAS,EACT,OAA6B,EAC7B,IAAwB,EACxB,WAA8B;QAE9B,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,QAAQ,CAC3C,OAAO,CAAC,UAAU,EAClB,OAAO,CAAC,aAAa,EAAE,EACvB,UAAU,CAAC,EAAE,CACd,CAAA;QAED,uCAAY,KAAK,CAAC,IAAI,KAAE,EAAE,EAAE,KAAK,CAAC,EAAE,IAAE;IACxC,CAAC;CACF;AAjCD,wDAiCC"}
@@ -1,5 +1,5 @@
1
1
  import { FieldResolver, ResolvedEntryData, FieldResolverContext } from './fieldResolver';
2
- import { Entry } from '../../persistence/persistence.service';
2
+ import { EntryData } from '@commitspark/git-adapter';
3
3
  import { GraphQLFieldResolver } from 'graphql/type/definition';
4
4
  import { EntryTypeUtil } from '../schema-utils/entry-type-util';
5
5
  import { UnionValueResolver } from './union-value-resolver';
@@ -8,7 +8,7 @@ export declare class FieldDefaultValueResolver implements FieldResolver<any> {
8
8
  private readonly entryTypeUtil;
9
9
  private readonly unionValueResolver;
10
10
  private readonly entryReferenceResolver;
11
- resolve: GraphQLFieldResolver<any, FieldResolverContext, any, Promise<ResolvedEntryData<Entry | Entry[] | null>>>;
11
+ resolve: GraphQLFieldResolver<any, FieldResolverContext, any, Promise<ResolvedEntryData<EntryData | EntryData[] | null>>>;
12
12
  constructor(entryTypeUtil: EntryTypeUtil, unionValueResolver: UnionValueResolver, entryReferenceResolver: EntryReferenceResolver);
13
13
  private resolveFieldValue;
14
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"field-default-value-resolver.js","sourceRoot":"","sources":["../../../src/graphql/field-resolver/field-default-value-resolver.ts"],"names":[],"mappings":";;;AAWA,qCAOgB;AAKhB,MAAa,yBAAyB;IAQpC,YACmB,aAA4B,EAC5B,kBAAsC,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CACb,sDAAsD,IAAI,CAAC,SAAS,cAAc,IAAI,CAAC,UAAU,CAAC,IAAI,IAAI,CAC3G,CAAA;iBACF;qBAAM;oBACL,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAA;iBAC/C;aACF;YAED,IAAI,IAAI,CAAC,aAAa,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE;gBACrD,OAAO,IAAI,CAAC,sBAAsB,CAAC,OAAO,CACxC,UAAU,EACV,IAAI,EACJ,OAAO,EACP,IAAI,CACL,CAAA;aACF;YAED,OAAO,UAAU,CAAA;SAClB;QAED,OAAO,UAAU,CAAA;IACnB,CAAC;CACF;AAlID,8DAkIC"}
1
+ {"version":3,"file":"field-default-value-resolver.js","sourceRoot":"","sources":["../../../src/graphql/field-resolver/field-default-value-resolver.ts"],"names":[],"mappings":";;;AAWA,qCAOgB;AAKhB,MAAa,yBAAyB;IAQpC,YACmB,aAA4B,EAC5B,kBAAsC,EACtC,sBAA8C;QAF9C,kBAAa,GAAb,aAAa,CAAe;QAC5B,uBAAkB,GAAlB,kBAAkB,CAAoB;QACtC,2BAAsB,GAAtB,sBAAsB,CAAwB;QAE/D,IAAI,CAAC,OAAO,GAAG,CACb,UAAU,EACV,IAAI,EACJ,OAAO,EACP,IAAI,EACwD,EAAE,CAC9D,IAAI,CAAC,iBAAiB,CACpB,UAAU,EACV,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,IAAI,CAAC,UAAU,EACf,KAAK,CACN,CAAA;IACL,CAAC;IAEO,iBAAiB,CACvB,UAAe,EACf,IAAS,EACT,OAA6B,EAC7B,IAAwB,EACxB,WAA8B,EAC9B,gBAAyB;QAEzB,IAAI,IAAA,uBAAa,EAAC,WAAW,CAAC,EAAE;YAC9B,OAAO,IAAI,CAAC,iBAAiB,CAC3B,UAAU,EACV,IAAI,EACJ;gBACE,UAAU,EAAE,OAAO,CAAC,UAAU;gBAC9B,a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AS,0CACf,IAAI,CAAC,UAA+C,CAAC,MAAM,CAAC,IAC/D,IAAI,CACL,CAAA;iBACF;qBAAM;oBACL,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAA;iBAC/C;aACF;YAED,IAAI,IAAI,CAAC,aAAa,CAAC,8BAA8B,CAAC,WAAW,CAAC,EAAE;gBAClE,OAAO,IAAI,CAAC,sBAAsB,CAAC,OAAO,CACxC,UAAU,EACV,IAAI,EACJ,OAAO,EACP,IAAI,CACL,CAAA;aACF;YAED,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAA;SACxE;aAAM,IAAI,IAAA,sBAAY,EAAC,WAAW,CAAC,EAAE;YACpC,IAAI,UAAU,KAAK,SAAS,IAAI,UAAU,KAAK,IAAI,EAAE;gBACnD,IAAI,gBAAgB,EAAE;oBACpB,MAAM,IAAI,KAAK,CACb,sDAAsD,IAAI,CAAC,SAAS,cAAc,IAAI,CAAC,UAAU,CAAC,IAAI,IAAI,CAC3G,CAAA;iBACF;qBAAM;oBACL,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAA;iBAC/C;aACF;YAED,IAAI,IAAI,CAAC,aAAa,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE;gBACrD,OAAO,IAAI,CAAC,sBAAsB,CAAC,OAAO,CACxC,UAAU,EACV,IAAI,EACJ,OAAO,EACP,IAAI,CACL,CAAA;aACF;YAED,OAAO,UAAU,CAAA;SAClB;QAED,OAAO,UAAU,CAAA;IACnB,CAAC;CACF;AAlID,8DAkIC"}
@@ -1,11 +1,11 @@
1
1
  import { GraphQLFieldResolver } from 'graphql/type/definition';
2
- import { Entry } from '../../persistence/persistence.service';
2
+ import { EntryData } from '@commitspark/git-adapter';
3
3
  import { GitAdapter } from '@commitspark/git-adapter';
4
4
  export interface FieldResolverContext {
5
5
  gitAdapter: GitAdapter;
6
6
  getCurrentRef(): string;
7
7
  }
8
- export interface FieldResolver<TSource, TContext = FieldResolverContext, TArgs = any, TResult = Promise<ResolvedEntryData<Entry | Entry[] | null>>> {
8
+ export interface FieldResolver<TSource, TContext = FieldResolverContext, TArgs = any, TResult = Promise<ResolvedEntryData<EntryData | EntryData[] | null>>> {
9
9
  resolve: GraphQLFieldResolver<TSource, TContext, TArgs, TResult>;
10
10
  }
11
11
  export type ResolvedEntryData<T> = T | Array<ResolvedEntryData<T>>;
@@ -1,10 +1,10 @@
1
1
  import { GraphQLFieldResolver } from 'graphql/type/definition';
2
- import { Entry } from '../../persistence/persistence.service';
2
+ import { EntryData } from '@commitspark/git-adapter';
3
3
  import { FieldResolver, ResolvedEntryData, FieldResolverContext } from './fieldResolver';
4
4
  import { UnionTypeUtil } from '../schema-utils/union-type-util';
5
5
  export declare class UnionValueResolver implements FieldResolver<any> {
6
6
  private readonly unionTypeUtil;
7
- resolve: GraphQLFieldResolver<any, FieldResolverContext, any, Promise<ResolvedEntryData<Entry | Entry[] | null>>>;
7
+ resolve: GraphQLFieldResolver<any, FieldResolverContext, any, Promise<ResolvedEntryData<EntryData | EntryData[] | null>>>;
8
8
  constructor(unionTypeUtil: UnionTypeUtil);
9
9
  private resolveFieldValue;
10
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"union-value-resolver.js","sourceRoot":"","sources":["../../../src/graphql/field-resolver/union-value-resolver.ts"],"names":[],"mappings":";;;AASA,MAAa,kBAAkB;IAQ7B,YAA6B,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;QACvD,IAAI,CAAC,OAAO,GAAG,CACb,UAAU,EACV,IAAI,EACJ,OAAO,EACP,IAAI,EACgD,EAAE,CACtD,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAA;IACtC,CAAC;IAEO,iBAAiB,CACvB,UAAe;QAEf,MAAM,QAAQ,GACZ,IAAI,CAAC,aAAa,CAAC,8BAA8B,CAAC,UAAU,CAAC,CAAA;QAC/D,MAAM,UAAU,GAAG,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,UAAU,CAAC,CAAA;QAM/D,MAAM,GAAG,mCACJ,UAAU,KACb,UAAU,EAAE,QAAQ,GACrB,CAAA;QAED,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAA;IAC/C,CAAC;CACF;AApCD,gDAoCC"}
1
+ {"version":3,"file":"union-value-resolver.js","sourceRoot":"","sources":["../../../src/graphql/field-resolver/union-value-resolver.ts"],"names":[],"mappings":";;;AASA,MAAa,kBAAkB;IAQ7B,YAA6B,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;QACvD,IAAI,CAAC,OAAO,GAAG,CACb,UAAU,EACV,IAAI,EACJ,OAAO,EACP,IAAI,EACwD,EAAE,CAC9D,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAA;IACtC,CAAC;IAEO,iBAAiB,CACvB,UAAe;QAEf,MAAM,QAAQ,GACZ,IAAI,CAAC,aAAa,CAAC,8BAA8B,CAAC,UAAU,CAAC,CAAA;QAC/D,MAAM,UAAU,GAAG,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,UAAU,CAAC,CAAA;QAM/D,MAAM,GAAG,mCACJ,UAAU,KACb,UAAU,EAAE,QAAQ,GACrB,CAAA;QAED,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAA;IAC/C,CAAC;CACF;AApCD,gDAoCC"}
@@ -1,4 +1,4 @@
1
- import { Entry } from '../persistence/persistence.service';
1
+ import { EntryData } from '@commitspark/git-adapter';
2
2
  import { ApolloContext } from '../app/api.service';
3
3
  import { GraphQLFieldResolver } from 'graphql/type/definition';
4
4
  import { GraphQLObjectType } from 'graphql/type';
@@ -22,12 +22,12 @@ export declare class QueriesMutationsGeneratorService {
22
22
  generateTypeNameQuery(): IGeneratedQuery<Promise<string>>;
23
23
  }
24
24
  export interface IGeneratedSchema {
25
- queryAll: IGeneratedQuery<Promise<Entry[]>>;
25
+ queryAll: IGeneratedQuery<Promise<EntryData[]>>;
26
26
  queryAllMeta: IGeneratedQuery<Promise<TypeCount>>;
27
- queryById: IGeneratedQuery<Promise<Entry>>;
28
- createMutation: IGeneratedQuery<Promise<Entry>>;
29
- updateMutation: IGeneratedQuery<Promise<Entry>>;
30
- deleteMutation: IGeneratedQuery<Promise<Entry>>;
27
+ queryById: IGeneratedQuery<Promise<EntryData>>;
28
+ createMutation: IGeneratedQuery<Promise<EntryData>>;
29
+ updateMutation: IGeneratedQuery<Promise<EntryData>>;
30
+ deleteMutation: IGeneratedQuery<Promise<EntryData>>;
31
31
  }
32
32
  export interface IGeneratedQuery<T> {
33
33
  name: string;
@@ -68,13 +68,13 @@ class QueriesMutationsGeneratorService {
68
68
  });
69
69
  }
70
70
  generateTypeNameQuery() {
71
- const contentTypeQueryName = '_typeName';
72
- const contentTypeQueryString = `${contentTypeQueryName}(id: ID!): String`;
73
- const contentTypeQueryResolver = this.queryTypeByIdResolverGenerator.createResolver();
71
+ const entryTypeQueryName = '_typeName';
72
+ const entryTypeQueryString = `${entryTypeQueryName}(id: ID!): String`;
73
+ const entryTypeQueryResolver = this.queryTypeByIdResolverGenerator.createResolver();
74
74
  return {
75
- name: contentTypeQueryName,
76
- schemaString: contentTypeQueryString,
77
- resolver: contentTypeQueryResolver,
75
+ name: entryTypeQueryName,
76
+ schemaString: entryTypeQueryString,
77
+ resolver: entryTypeQueryResolver,
78
78
  };
79
79
  }
80
80
  }
@@ -1 +1 @@
1
- {"version":3,"file":"queries-mutations-generator.service.js","sourceRoot":"","sources":["../../src/graphql/queries-mutations-generator.service.ts"],"names":[],"mappings":";;;AAYA,MAAa,gCAAgC;IAC3C,YACmB,yBAAoD,EACpD,0BAAsD,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CAAC,CAAC,CAAA;IACJ,CAAC;IAEM,qBAAqB;QAC1B,MAAM,oBAAoB,GAAG,WAAW,CAAA;QACxC,MAAM,sBAAsB,GAAG,GAAG,oBAAoB,mBAAmB,CAAA;QACzE,MAAM,wBAAwB,GAK1B,IAAI,CAAC,8BAA8B,CAAC,cAAc,EAAE,CAAA;QAExD,OAAO;YACL,IAAI,EAAE,oBAAoB;YAC1B,YAAY,EAAE,sBAAsB;YACpC,QAAQ,EAAE,wBAAwB;SACnC,CAAA;IACH,CAAC;CACF;AA3HD,4EA2HC"}
1
+ {"version":3,"file":"queries-mutations-generator.service.js","sourceRoot":"","sources":["../../src/graphql/queries-mutations-generator.service.ts"],"names":[],"mappings":";;;AAYA,MAAa,gCAAgC;IAC3C,YACmB,yBAAoD,EACpD,0BAAsD,EACtD,8BAA8D,EAC9D,8BAA8D,EAC9D,+BAAgE,EAChE,+BAAgE,EAChE,+BAAgE;QANhE,8BAAyB,GAAzB,yBAAyB,CAA2B;QACpD,+BAA0B,GAA1B,0BAA0B,CAA4B;QACtD,mCAA8B,GAA9B,8BAA8B,CAAgC;QAC9D,mCAA8B,GAA9B,8BAA8B,CAAgC;QAC9D,oCAA+B,GAA/B,+BAA+B,CAAiC;QAChE,oCAA+B,GAA/B,+BAA+B,CAAiC;QAChE,oCAA+B,GAA/B,+BAA+B,CAAiC;IAChF,CAAC;IAEG,0BAA0B,CAC/B,mBAAwC;QAExC,OAAO,mBAAmB,CAAC,GAAG,CAAC,CAAC,UAAU,EAAoB,EAAE;YAC9D,MAAM,QAAQ,GAAG,UAAU,CAAC,IAAI,CAAA;YAEhC,MAAM,YAAY,GAAG,MAAM,QAAQ,GAAG,CAAA;YACtC,MAAM,cAAc,GAAG,GAAG,YAAY,MAAM,UAAU,CAAC,IAAI,GAAG,CAAA;YAC9D,MAAM,gBAAgB,GAKlB,IAAI,CAAC,yBAAyB,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAA;YAE3D,MAAM,gBAAgB,GAAG,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Y,EAAE,kBAAkB;oBAChC,QAAQ,EAAE,oBAAoB;iBAC/B;gBACD,SAAS,EAAE;oBACT,IAAI,EAAE,aAAa;oBACnB,YAAY,EAAE,eAAe;oBAC7B,QAAQ,EAAE,iBAAiB;iBAC5B;gBACD,cAAc,EAAE;oBACd,IAAI,EAAE,kBAAkB;oBACxB,YAAY,EAAE,oBAAoB;oBAClC,QAAQ,EAAE,sBAAsB;iBACjC;gBACD,cAAc,EAAE;oBACd,IAAI,EAAE,kBAAkB;oBACxB,YAAY,EAAE,oBAAoB;oBAClC,QAAQ,EAAE,sBAAsB;iBACjC;gBACD,cAAc,EAAE;oBACd,IAAI,EAAE,kBAAkB;oBACxB,YAAY,EAAE,oBAAoB;oBAClC,QAAQ,EAAE,sBAAsB;iBACjC;aACF,CAAA;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;IAEM,qBAAqB;QAC1B,MAAM,kBAAkB,GAAG,WAAW,CAAA;QACtC,MAAM,oBAAoB,GAAG,GAAG,kBAAkB,mBAAmB,CAAA;QACrE,MAAM,sBAAsB,GAKxB,IAAI,CAAC,8BAA8B,CAAC,cAAc,EAAE,CAAA;QAExD,OAAO;YACL,IAAI,EAAE,kBAAkB;YACxB,YAAY,EAAE,oBAAoB;YAClC,QAAQ,EAAE,sBAAsB;SACjC,CAAA;IACH,CAAC;CACF;AA3HD,4EA2HC"}
@@ -1,10 +1,11 @@
1
1
  import { GraphQLFieldResolver } from 'graphql/type/definition';
2
2
  import { ApolloContext } from '../../app/api.service';
3
- import { Entry, PersistenceService } from '../../persistence/persistence.service';
3
+ import { PersistenceService } from '../../persistence/persistence.service';
4
4
  import { EntryReferenceUtil } from '../schema-utils/entry-reference-util';
5
+ import { EntryData } from '@commitspark/git-adapter';
5
6
  export declare class MutationCreateResolverGenerator {
6
7
  private readonly persistence;
7
8
  private readonly entryReferenceUtil;
8
9
  constructor(persistence: PersistenceService, entryReferenceUtil: EntryReferenceUtil);
9
- createResolver(typeName: string): GraphQLFieldResolver<any, ApolloContext, any, Promise<Entry>>;
10
+ createResolver(typeName: string): GraphQLFieldResolver<any, ApolloContext, any, Promise<EntryData>>;
10
11
  }