Skip to content
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

Merged
merged 9 commits into from
Nov 18, 2024
Merged

Conversation

rikukissa
Copy link
Member

@rikukissa rikukissa commented Nov 18, 2024

Client

src/v2-events - this is where all events related views and their dependencies should be created or copied

Gateway

src/v2-events - all queries, mutations and other related should be built here

Events

New service that handles storing and reading events. Assumes user authorisation is done in gateway

Copy link

Oops! Looks like you forgot to update the changelog. When updating CHANGELOG.md, please consider the following:

  • Changelog is read by country implementors who might not always be familiar with all technical details of OpenCRVS. Keep language high-level, user friendly and avoid technical references to internals.
  • Answer "What's new?", "Why was the change made?" and "Why should I care?" for each change.
  • If it's a breaking change, include a migration guide answering "What do I need to do to upgrade?".

@rikukissa rikukissa added the 🚀 Ready to deploy Deployment automation should pick this PR up and start auto-deploying it label Nov 18, 2024
@rikukissa rikukissa linked an issue Nov 18, 2024 that may be closed by this pull request
1 task
@ocrvs-bot
Copy link
Collaborator

Your environment is deployed to https://ocrvs-7869.opencrvs.dev

Copy link
Collaborator

@makelicious makelicious left a 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/client/src/App.tsx Outdated Show resolved Hide resolved
packages/events/src/storage/index.ts Outdated Show resolved Hide resolved
packages/events/src/index.ts Outdated Show resolved Hide resolved

const appRouter = router({
createRecord: publicProcedure
.input(
Copy link
Collaborator

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 Show resolved Hide resolved
packages/events/src/index.ts Show resolved Hide resolved
packages/events/src/storage/index.ts Outdated Show resolved Hide resolved
packages/events/src/storage/index.ts Outdated Show resolved Hide resolved
packages/events/src/storage/index.ts Outdated Show resolved Hide resolved
]
})

return getRecordByMongoId(document.insertedId)
Copy link
Collaborator

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?

Copy link
Member Author

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?

@@ -0,0 +1,37 @@
import { vi, test, beforeAll, afterEach, expect } from 'vitest'
Copy link
Collaborator

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,
    }
});

@rikukissa rikukissa merged commit eb2894a into develop Nov 18, 2024
62 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚀 Ready to deploy Deployment automation should pick this PR up and start auto-deploying it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Define directory structures & API endpoints
3 participants