@commitspark/graphql-api 0.10.0 → 0.11.0
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/CHANGELOG.md +4 -0
- package/README.md +96 -85
- package/dist/graphql/field-resolver/entry-reference-resolver.d.ts +3 -2
- package/dist/graphql/field-resolver/entry-reference-resolver.js.map +1 -1
- package/dist/graphql/field-resolver/field-default-value-resolver.d.ts +2 -2
- package/dist/graphql/field-resolver/field-default-value-resolver.js.map +1 -1
- package/dist/graphql/field-resolver/fieldResolver.d.ts +2 -2
- package/dist/graphql/field-resolver/union-value-resolver.d.ts +2 -2
- package/dist/graphql/field-resolver/union-value-resolver.js.map +1 -1
- package/dist/graphql/queries-mutations-generator.service.d.ts +6 -6
- package/dist/graphql/queries-mutations-generator.service.js +6 -6
- package/dist/graphql/queries-mutations-generator.service.js.map +1 -1
- package/dist/graphql/resolver-generators/mutation-create-resolver-generator.d.ts +3 -2
- package/dist/graphql/resolver-generators/mutation-create-resolver-generator.js +1 -1
- package/dist/graphql/resolver-generators/mutation-create-resolver-generator.js.map +1 -1
- package/dist/graphql/resolver-generators/mutation-delete-resolver-generator.d.ts +3 -2
- package/dist/graphql/resolver-generators/mutation-delete-resolver-generator.js +1 -1
- package/dist/graphql/resolver-generators/mutation-delete-resolver-generator.js.map +1 -1
- package/dist/graphql/resolver-generators/mutation-update-resolver-generator.d.ts +3 -2
- package/dist/graphql/resolver-generators/mutation-update-resolver-generator.js +1 -1
- package/dist/graphql/resolver-generators/mutation-update-resolver-generator.js.map +1 -1
- package/dist/graphql/resolver-generators/object-type-field-default-value-resolver-generator.d.ts +2 -2
- package/dist/graphql/resolver-generators/object-type-field-default-value-resolver-generator.js.map +1 -1
- package/dist/graphql/resolver-generators/query-all-resolver-generator.d.ts +3 -2
- package/dist/graphql/resolver-generators/query-all-resolver-generator.js.map +1 -1
- package/dist/graphql/resolver-generators/query-by-id-resolver-generator.d.ts +3 -2
- package/dist/graphql/resolver-generators/query-by-id-resolver-generator.js.map +1 -1
- package/dist/graphql/schema-utils/union-type-util.d.ts +2 -2
- package/dist/persistence/persistence.service.d.ts +4 -8
- package/dist/persistence/persistence.service.js +8 -8
- package/dist/persistence/persistence.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/graphql/field-resolver/entry-reference-resolver.ts +5 -7
- package/src/graphql/field-resolver/field-default-value-resolver.ts +4 -4
- package/src/graphql/field-resolver/fieldResolver.ts +2 -2
- package/src/graphql/field-resolver/union-value-resolver.ts +5 -5
- package/src/graphql/queries-mutations-generator.service.ts +17 -17
- package/src/graphql/resolver-generators/mutation-create-resolver-generator.ts +9 -11
- package/src/graphql/resolver-generators/mutation-delete-resolver-generator.ts +7 -10
- package/src/graphql/resolver-generators/mutation-update-resolver-generator.ts +9 -12
- package/src/graphql/resolver-generators/object-type-field-default-value-resolver-generator.ts +5 -5
- package/src/graphql/resolver-generators/query-all-resolver-generator.ts +4 -6
- package/src/graphql/resolver-generators/query-by-id-resolver-generator.ts +4 -6
- package/src/graphql/schema-generator.service.ts +2 -2
- package/src/graphql/schema-utils/union-type-util.ts +2 -2
- package/src/persistence/persistence.service.ts +12 -25
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [0.11.0] - 2024-08-17
|
|
8
|
+
### Changed
|
|
9
|
+
- Upgrade to `@commitspark/git-adapter` 0.13.0
|
|
10
|
+
|
|
7
11
|
## [0.10.0] - 2024-06-15
|
|
8
12
|
### Added
|
|
9
13
|
- Add referential integrity by tracking and validating references between entries
|
package/README.md
CHANGED
|
@@ -1,61 +1,31 @@
|
|
|
1
1
|
# Introduction
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
|
|
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
|
-
|
|
10
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
56
|
-
hosted or locally. When
|
|
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
|
|
81
|
-
different branches with different
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
83
|
+
### Generated mutations
|
|
112
84
|
|
|
113
|
-
For each
|
|
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
|
-
##
|
|
96
|
+
## Data model
|
|
130
97
|
|
|
131
|
-
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
|
|
104
|
+
Commitspark currently supports the following GraphQL types:
|
|
137
105
|
|
|
138
106
|
* `type`
|
|
139
107
|
* `union`
|
|
140
108
|
* `enum`
|
|
141
109
|
|
|
142
|
-
###
|
|
110
|
+
### Data entries
|
|
143
111
|
|
|
144
|
-
To denote which
|
|
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
|
|
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
|
|
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
|
-
##
|
|
135
|
+
## Entry storage
|
|
168
136
|
|
|
169
|
-
|
|
170
|
-
a folder `entries
|
|
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
|
-
|
|
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
|
-
|
|
175
|
+
type: Link
|
|
176
|
+
referencedBy: [ ]
|
|
205
177
|
data:
|
|
206
|
-
|
|
207
|
-
|
|
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
|
-
|
|
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
|
-
|
|
207
|
+
type Hero {
|
|
208
|
+
heroText: String!
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
type Text {
|
|
212
|
+
bodyText: String!
|
|
213
|
+
}
|
|
214
|
+
```
|
|
213
215
|
|
|
214
|
-
|
|
215
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 {
|
|
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<
|
|
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":";;;
|
|
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 {
|
|
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<
|
|
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,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,
|
|
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,aAAa,EAAE,OAAO,CAAC,aAAa;aACrC,EACD,IAAI,EACJ,WAAW,CAAC,MAAM,EAClB,IAAI,CACL,CAAA;SACF;aAAM,IAAI,IAAA,oBAAU,EAAC,WAAW,CAAC,EAAE;YAClC,IAAI,UAAU,KAAK,SAAS,IAAI,UAAU,KAAK,IAAI,EAAE;gBACnD,I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,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 {
|
|
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<
|
|
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 {
|
|
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<
|
|
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,
|
|
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 {
|
|
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<
|
|
25
|
+
queryAll: IGeneratedQuery<Promise<EntryData[]>>;
|
|
26
26
|
queryAllMeta: IGeneratedQuery<Promise<TypeCount>>;
|
|
27
|
-
queryById: IGeneratedQuery<Promise<
|
|
28
|
-
createMutation: IGeneratedQuery<Promise<
|
|
29
|
-
updateMutation: IGeneratedQuery<Promise<
|
|
30
|
-
deleteMutation: IGeneratedQuery<Promise<
|
|
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
|
|
72
|
-
const
|
|
73
|
-
const
|
|
71
|
+
const entryTypeQueryName = '_typeName';
|
|
72
|
+
const entryTypeQueryString = `${entryTypeQueryName}(id: ID!): String`;
|
|
73
|
+
const entryTypeQueryResolver = this.queryTypeByIdResolverGenerator.createResolver();
|
|
74
74
|
return {
|
|
75
|
-
name:
|
|
76
|
-
schemaString:
|
|
77
|
-
resolver:
|
|
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,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,CAA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M,oBAAoB,GAAG,GAAG,kBAAkB,2CAA2C,CAAA;YAC7F,MAAM,sBAAsB,GAKxB,IAAI,CAAC,+BAA+B,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAA;YAEjE,OAAO;gBACL,QAAQ,EAAE;oBACR,IAAI,EAAE,YAAY;oBAClB,YAAY,EAAE,cAAc;oBAC5B,QAAQ,EAAE,gBAAgB;iBAC3B;gBACD,YAAY,EAAE;oBACZ,IAAI,EAAE,gBAAgB;oBACtB,YAAY,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,
|
|
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,GAA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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 {
|
|
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<
|
|
10
|
+
createResolver(typeName: string): GraphQLFieldResolver<any, ApolloContext, any, Promise<EntryData>>;
|
|
10
11
|
}
|
|
@@ -60,7 +60,7 @@ class MutationCreateResolverGenerator {
|
|
|
60
60
|
const commit = await context.gitAdapter.createCommit({
|
|
61
61
|
ref: context.branch,
|
|
62
62
|
parentSha: context.getCurrentRef(),
|
|
63
|
-
|
|
63
|
+
entries: [newEntryDraft, ...referencedEntryUpdates],
|
|
64
64
|
message: args.message,
|
|
65
65
|
});
|
|
66
66
|
context.setCurrentRef(commit.ref);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutation-create-resolver-generator.js","sourceRoot":"","sources":["../../../src/graphql/resolver-generators/mutation-create-resolver-generator.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"mutation-create-resolver-generator.js","sourceRoot":"","sources":["../../../src/graphql/resolver-generators/mutation-create-resolver-generator.ts"],"names":[],"mappings":";;;AAGA,6DAAyD;AAEzD,qCAAsC;AACtC,0DAIiC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AAC,aAAa,EAAE,EACvB,QAAQ,EACR,IAAI,CAAC,EAAE,CACR,CAAA;YACD,uCAAY,QAAQ,CAAC,IAAI,KAAE,EAAE,EAAE,QAAQ,CAAC,EAAE,IAAE;QAC9C,CAAC,CAAA;IACH,CAAC;CACF;AA3GD,0EA2GC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PersistenceService } from '../../persistence/persistence.service';
|
|
2
2
|
import { GraphQLFieldResolver } from 'graphql/type/definition';
|
|
3
3
|
import { ApolloContext } from '../../app/api.service';
|
|
4
|
+
import { EntryData } from '@commitspark/git-adapter';
|
|
4
5
|
import { EntryReferenceUtil } from '../schema-utils/entry-reference-util';
|
|
5
6
|
export declare class MutationDeleteResolverGenerator {
|
|
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<
|
|
10
|
+
createResolver(typeName: string): GraphQLFieldResolver<any, ApolloContext, any, Promise<EntryData>>;
|
|
10
11
|
}
|
|
@@ -37,7 +37,7 @@ class MutationDeleteResolverGenerator {
|
|
|
37
37
|
const commit = await context.gitAdapter.createCommit({
|
|
38
38
|
ref: context.branch,
|
|
39
39
|
parentSha: context.getCurrentRef(),
|
|
40
|
-
|
|
40
|
+
entries: [
|
|
41
41
|
Object.assign(Object.assign({}, entry), { deletion: true }),
|
|
42
42
|
...referencedEntryUpdates,
|
|
43
43
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutation-delete-resolver-generator.js","sourceRoot":"","sources":["../../../src/graphql/resolver-generators/mutation-delete-resolver-generator.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"mutation-delete-resolver-generator.js","sourceRoot":"","sources":["../../../src/graphql/resolver-generators/mutation-delete-resolver-generator.ts"],"names":[],"mappings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ACX,CAAA;YACH,MAAM,sBAAsB,GAAiB,EAAE,CAAA;YAC/C,KAAK,MAAM,iBAAiB,IAAI,kBAAkB,EAAE;gBAClD,MAAM,uBAAuB,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,QAAQ,CAC7D,OAAO,CAAC,UAAU,EAClB,OAAO,CAAC,aAAa,EAAE,EACvB,iBAAiB,CAClB,CAAA;gBACD,sBAAsB,CAAC,IAAI,iCACtB,uBAAuB,KAC1B,QAAQ,kCACH,uBAAuB,CAAC,QAAQ,KACnC,YAAY,EAAE,MAAA,uBAAuB,CAAC,QAAQ,CAAC,YAAY,0CAAE,MAAM,CACjE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,KAAK,IAAI,CAAC,EAAE,CACjC,KAEH,QAAQ,EAAE,KAAK,IACf,CAAA;aACH;YAED,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC;gBACnD,GAAG,EAAE,OAAO,CAAC,MAAM;gBACnB,SAAS,EAAE,OAAO,CAAC,aAAa,EAAE;gBAClC,OAAO,EAAE;oDAEF,KAAK,KACR,QAAQ,EAAE,IAAI;oBAEhB,GAAG,sBAAsB;iBAC1B;gBACD,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB,CAAC,CAAA;YACF,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;YAEjC,OAAO;gBACL,EAAE,EAAE,IAAI,CAAC,EAAE;aACZ,CAAA;QACH,CAAC,CAAA;IACH,CAAC;CACF;AA3FD,0EA2FC"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PersistenceService } from '../../persistence/persistence.service';
|
|
2
2
|
import { GraphQLFieldResolver } from 'graphql/type/definition';
|
|
3
3
|
import { ApolloContext } from '../../app/api.service';
|
|
4
4
|
import { EntryReferenceUtil } from '../schema-utils/entry-reference-util';
|
|
5
|
+
import { EntryData } from '@commitspark/git-adapter';
|
|
5
6
|
export declare class MutationUpdateResolverGenerator {
|
|
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<
|
|
10
|
+
createResolver(typeName: string): GraphQLFieldResolver<any, ApolloContext, any, Promise<EntryData>>;
|
|
10
11
|
private mergeData;
|
|
11
12
|
}
|
|
@@ -34,7 +34,7 @@ class MutationUpdateResolverGenerator {
|
|
|
34
34
|
const commit = await context.gitAdapter.createCommit({
|
|
35
35
|
ref: context.branch,
|
|
36
36
|
parentSha: context.getCurrentRef(),
|
|
37
|
-
|
|
37
|
+
entries: [
|
|
38
38
|
Object.assign(Object.assign({}, existingEntry), { data: mergedData, deletion: false }),
|
|
39
39
|
...referencedEntryUpdates,
|
|
40
40
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutation-update-resolver-generator.js","sourceRoot":"","sources":["../../../src/graphql/resolver-generators/mutation-update-resolver-generator.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"mutation-update-resolver-generator.js","sourceRoot":"","sources":["../../../src/graphql/resolver-generators/mutation-update-resolver-generator.ts"],"names":[],"mappings":";;;AAIA,qCAAsC;AAGtC,MAAa,+BAA+B;IAC1C,YACmB,WAA+B,EAC/B,kBAAsC;QADtC,gBAAW,GAAX,WAAW,CAAoB;QAC/B,uBAAkB,GAAlB,kBAAkB,CAAoB;IACtD,CAAC;IAEG,cAAc,CACnB,QAAgB;QAEhB,OAAO,KAAK,EACV,MAAM,EACN,IAAI,EACJ,OAAsB,EACtB,IAAI,EACgB,EAAE;;YACtB,IAAI,CAAC,IAAA,sBAAY,EAAC,IAAI,CAAC,UAAU,CAAC,EAAE;gBAClC,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAA;aACpD;YAED,MAAM,aAAa,GAAG,MAAM,IAAI,C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AAE,EAAE,EAAE,YAAY,CAAC,EAAE,IAAE;QACtD,CAAC,CAAA;IACH,CAAC;IAEO,SAAS,CACf,iBAA4B,EAC5B,UAAqB;QAErB,uCACK,iBAAiB,GACjB,UAAU,EACd;IACH,CAAC;CACF;AAxHD,0EAwHC"}
|
package/dist/graphql/resolver-generators/object-type-field-default-value-resolver-generator.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { GraphQLFieldResolver } from 'graphql/type/definition';
|
|
2
2
|
import { ApolloContext } from '../../app/api.service';
|
|
3
|
-
import {
|
|
3
|
+
import { EntryData } from '@commitspark/git-adapter';
|
|
4
4
|
import { GraphQLSchema } from 'graphql';
|
|
5
5
|
import { ResolvedEntryData } from '../field-resolver/fieldResolver';
|
|
6
6
|
import { FieldDefaultValueResolver } from '../field-resolver/field-default-value-resolver';
|
|
7
7
|
export declare class ObjectTypeFieldDefaultValueResolverGenerator {
|
|
8
8
|
private readonly fieldDefaultValueResolver;
|
|
9
9
|
constructor(fieldDefaultValueResolver: FieldDefaultValueResolver);
|
|
10
|
-
createResolver(schema: GraphQLSchema): Record<string, Record<string, GraphQLFieldResolver<any, ApolloContext, any, Promise<ResolvedEntryData<
|
|
10
|
+
createResolver(schema: GraphQLSchema): Record<string, Record<string, GraphQLFieldResolver<any, ApolloContext, any, Promise<ResolvedEntryData<EntryData | EntryData[] | null>>>>>;
|
|
11
11
|
private getFieldsForCustomDefaultValueResolver;
|
|
12
12
|
private requiresCustomDefaultValueResolver;
|
|
13
13
|
}
|
package/dist/graphql/resolver-generators/object-type-field-default-value-resolver-generator.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object-type-field-default-value-resolver-generator.js","sourceRoot":"","sources":["../../../src/graphql/resolver-generators/object-type-field-default-value-resolver-generator.ts"],"names":[],"mappings":";;;AAMA,qCAQgB;AAIhB,MAAa,4CAA4C;IACvD,YACmB,yBAAoD;QAApD,8BAAyB,GAAzB,yBAAyB,CAA2B;IACpE,CAAC;IAEG,cAAc,CACnB,MAAqB;QAarB,MAAM,SAAS,GAWX,EAAE,CAAA;QACN,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,EAAE;YACvD,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;YACrC,IAAI,CAAC,IAAA,sBAAY,EAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;gBACrD,SAAQ;aACT;YACD,MAAM,UAAU,GAAG,IAAyB,CAAA;YAC5C,MAAM,mCAAmC,GACvC,IAAI,CAAC,sCAAsC,CAAC,UAAU,CAAC,CAAA;YAEzD,MAAM,cAAc,GAQhB,EAAE,CAAA;YACN,KAAK,MAAM,KAAK,IAAI,mCAAmC,EAAE;gBACvD,cAAc,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAC3B,GAAG,EACH,IAAI,EACJ,OAAO,EACP,IAAI,
|
|
1
|
+
{"version":3,"file":"object-type-field-default-value-resolver-generator.js","sourceRoot":"","sources":["../../../src/graphql/resolver-generators/object-type-field-default-value-resolver-generator.ts"],"names":[],"mappings":";;;AAMA,qCAQgB;AAIhB,MAAa,4CAA4C;IACvD,YACmB,yBAAoD;QAApD,8BAAyB,GAAzB,yBAAyB,CAA2B;IACpE,CAAC;IAEG,cAAc,CACnB,MAAqB;QAarB,MAAM,SAAS,GAWX,EAAE,CAAA;QACN,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,EAAE;YACvD,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;YACrC,IAAI,CAAC,IAAA,sBAAY,EAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;gBACrD,SAAQ;aACT;Y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