File tree Expand file tree Collapse file tree 9 files changed +42
-209
lines changed
Expand file tree Collapse file tree 9 files changed +42
-209
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " hawk.api" ,
3- "version" : " 1.1.18 " ,
3+ "version" : " 1.1.17 " ,
44 "main" : " index.ts" ,
55 "license" : " UNLICENSED" ,
66 "scripts" : {
Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ import PlansFactory from './models/plansFactory';
2626import BusinessOperationsFactory from './models/businessOperationsFactory' ;
2727import schema from './schema' ;
2828import { graphqlUploadExpress } from 'graphql-upload' ;
29- import ReleasesFactory from './models/releaseFactory' ;
3029
3130/**
3231 * Option to enable playground
@@ -146,16 +145,12 @@ class HawkAPI {
146145 // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
147146 const businessOperationsFactory = new BusinessOperationsFactory ( mongo . databases . hawk ! , dataLoaders ) ;
148147
149- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
150- const releasesFactory = new ReleasesFactory ( mongo . databases . events ! , dataLoaders ) ;
151-
152148 return {
153149 usersFactory,
154150 workspacesFactory,
155151 projectsFactory,
156152 plansFactory,
157153 businessOperationsFactory,
158- releasesFactory,
159154 } ;
160155 }
161156
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -265,26 +265,6 @@ module.exports = {
265265 return event ;
266266 } ,
267267
268- /**
269- * Returns project releases
270- *
271- * @param {ProjectDBScheme } project - result of parent resolver
272- * @param {ContextFactories } context - Global GraphQL context with factories
273- * @returns {Promise<Release[]> }
274- */
275- async releases ( project , _ , { factories } ) {
276- if ( ! project . _id ) {
277- throw new Error ( 'projectId is required to fetch releases' ) ;
278- }
279-
280- try {
281- return await factories . releasesFactory . findManyByProjectId ( project . _id . toString ( ) ) ;
282- } catch ( error ) {
283- console . error ( 'Error fetching releases:' , error ) ;
284- throw new Error ( 'Failed to get the releases' ) ;
285- }
286- } ,
287-
288268 /**
289269 * Find project events
290270 *
Original file line number Diff line number Diff line change @@ -16,6 +16,46 @@ type SourceCodeLine {
1616 content: String
1717}
1818
19+ """
20+ Release commit
21+ """
22+ type Commit {
23+ """
24+ Hash of the commit
25+ """
26+ hash: String!
27+
28+ """
29+ Commit author
30+ """
31+ author: String!
32+
33+ """
34+ Commit title
35+ """
36+ title: String!
37+
38+ """
39+ Commit creation date
40+ """
41+ date: DateTime!
42+ }
43+
44+ """
45+ Release data of the corresponding event
46+ """
47+ type Release {
48+ """
49+ Release name
50+ """
51+ releaseName: String! @renameFrom(name: "release")
52+
53+ """
54+ Release commits
55+ """
56+ commits: [Commit!]!
57+ }
58+
1959"""
2060Event backtrace representation
2161"""
Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ import workspaceMutations from './workspaceMutations';
1717import chart from './chart' ;
1818import plans from './plans' ;
1919import seed from './seed' ;
20- import release from './release' ;
2120import isE2E from '../utils/isE2E' ;
2221
2322const rootSchema = gql `
@@ -101,7 +100,6 @@ const typeDefinitions = [
101100 workspaceMutations ,
102101 chart ,
103102 plans ,
104- release ,
105103 projectEventGroupingPattern ,
106104 projectEventGroupingPatternMutations ,
107105] ;
Original file line number Diff line number Diff line change @@ -109,11 +109,6 @@ type Project {
109109 skip: Int = 0
110110 ): [Event!]
111111
112- """
113- Project releases
114- """
115- releases: [Release!]!
116-
117112 """
118113 Returns recent events grouped by day
119114 """
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -2,9 +2,9 @@ import UsersFactory from '../models/usersFactory';
22import WorkspacesFactory from '../models/workspacesFactory' ;
33import { GraphQLField } from 'graphql' ;
44import ProjectsFactory from '../models/projectsFactory' ;
5+ // import Accounting from 'codex-accounting-sdk';
56import PlansFactory from '../models/plansFactory' ;
67import BusinessOperationsFactory from '../models/businessOperationsFactory' ;
7- import ReleasesFactory from '../models/releaseFactory' ;
88
99/**
1010 * Resolver's Context argument
@@ -79,11 +79,6 @@ export interface ContextFactories {
7979 * Allows to work with the Business Operations models
8080 */
8181 businessOperationsFactory : BusinessOperationsFactory ;
82-
83- /**
84- * Allows to work with releases
85- */
86- releasesFactory : ReleasesFactory ;
8782}
8883
8984/**
You can’t perform that action at this time.
0 commit comments