Skip to content

Commit

Permalink
chore: split export type (#3569)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasburtey authored Nov 19, 2023
1 parent 2f5aec2 commit 78a66cf
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 24 deletions.
14 changes: 6 additions & 8 deletions core/api/src/servers/graphql-admin-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,9 @@ export async function startApolloServerForAdminSchema() {
})
}

if (require.main === module) {
setupMongoConnection()
.then(async () => {
activateLndHealthCheck()
await startApolloServerForAdminSchema()
})
.catch((err) => graphqlLogger.error(err, "server error"))
}
setupMongoConnection()
.then(async () => {
activateLndHealthCheck()
await startApolloServerForAdminSchema()
})
.catch((err) => graphqlLogger.error(err, "server error"))
28 changes: 13 additions & 15 deletions core/api/src/servers/graphql-main-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,18 +123,16 @@ export async function startApolloServerForCoreSchema() {
})
}

if (require.main === module) {
setupMongoConnection(true)
.then(async () => {
activateLndHealthCheck()

const res = await bootstrap()
if (res instanceof Error) throw res

await Promise.race([
startApolloServerForCoreSchema(),
startApolloServerForAdminSchema(),
])
})
.catch((err) => baseLogger.error(err, "server error"))
}
setupMongoConnection(true)
.then(async () => {
activateLndHealthCheck()

const res = await bootstrap()
if (res instanceof Error) throw res

await Promise.race([
startApolloServerForCoreSchema(),
startApolloServerForAdminSchema(),
])
})
.catch((err) => baseLogger.error(err, "server error"))
3 changes: 2 additions & 1 deletion core/api/src/services/ledger/books.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ import { Transaction, TransactionMetadata } from "./schema"

export const MainBook = new Book<ILedgerTransaction>("MainBook")

export { Transaction, TransactionMetadata, MediciEntryFromPackage }
export { Transaction, TransactionMetadata }
export type { MediciEntryFromPackage }

0 comments on commit 78a66cf

Please sign in to comment.