-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Events v2: Add some first structure for new events #8002
Conversation
Oops! Looks like you forgot to update the changelog. When updating CHANGELOG.md, please consider the following:
|
c49340b
to
a43219b
Compare
Your environment is deployed to https://ocrvs-7869.opencrvs.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff, comments on ordering of things
packages/events/src/index.ts
Outdated
|
||
const appRouter = router({ | ||
createRecord: publicProcedure | ||
.input( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could keep validation and routes in different files
packages/events/src/storage/index.ts
Outdated
] | ||
}) | ||
|
||
return getRecordByMongoId(document.insertedId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we get this by getRecordByTransactionId
or does the method change hold significance?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point 👍 Or even just the id:
, right?
c8408f2
to
585e9d0
Compare
585e9d0
to
7be0f53
Compare
7be0f53
to
9c445a6
Compare
packages/events/src/index.test.ts
Outdated
@@ -0,0 +1,37 @@ | |||
import { vi, test, beforeAll, afterEach, expect } from 'vitest' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to define these as globals. something like this might be close
export default defineConfig({
test: {
globals: true,
}
});
Client
src/v2-events
- this is where all events related views and their dependencies should be created or copiedGateway
src/v2-events
- all queries, mutations and other related should be built hereEvents
New service that handles storing and reading events. Assumes user authorisation is done in gateway