Closed gautam-divyanshu closed 2 weeks ago
The changes introduce two new queries to the GraphQL schema: agendaItemByEvent
and agendaItemByOrganization
. These queries allow fetching agenda items based on a specific event ID or organization ID. Additionally, the organization
field in the AgendaItemSchema
was renamed to organizationId
for better clarity and consistency.
File Path | Change Summary |
---|---|
schema.graphql |
Added new queries agendaItemByEvent and agendaItemByOrganization to the Query type. |
src/models/AgendaItem.ts |
Renamed the field from organization to organizationId in AgendaItemSchema . |
src/resolvers/Query |
Added new files agendaItemByOrganization.ts and agendaItemByEvent.ts with respective resolvers. |
src/typeDefs/queries.ts |
Updated query types to include agendaItemByEvent and agendaItemByOrganization . |
src/types/generatedGraphQLTypes.ts |
Added new query arguments types (QueryAgendaItemByEventArgs , QueryAgendaItemByOrganizationArgs ). |
tests/resolvers/Query/... |
Created test files to verify the new query resolvers (agendaItemByEvent.spec.ts , agendaItemByOrganization.spec.ts ). |
sequenceDiagram
participant Client
participant GraphQLServer
participant Database
Client->>GraphQLServer: Query agendaItemByEvent(relatedEventId: ID!)
GraphQLServer->>Database: Fetch agenda items with relatedEventId
Database-->>GraphQLServer: Return agenda items
GraphQLServer-->>Client: Return agenda items
Client->>GraphQLServer: Query agendaItemByOrganization(organizationId: ID!)
GraphQLServer->>Database: Fetch agenda items with organizationId
Database-->>GraphQLServer: Return agenda items
GraphQLServer-->>Client: Return agenda items
Objective | Addressed | Explanation |
---|---|---|
Add a query to fetch agenda items for a specific event (#2345) | ✅ | |
Add a query to fetch agenda items for a specific organization (#2345) | ✅ |
In code we weave a brand-new tale,
With queries swift, no chance to fail,
For events and groups our items find,
Linked by IDs so well-defined.
Oh code, you've grown so smart, so kind,
A masterpiece in every line! 🌟
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
We have these basic policies to make the approval process smoother for our volunteer team.
Please make sure your code passes all tests. Our test code coverage system will fail if these conditions occur:
The process helps maintain the overall reliability of the code base and is a prerequisite for getting your PR approved. Assigned reviewers regularly review the PR queue and tend to focus on PRs that are passing.
Do not assign reviewers. Our Queue Monitors will review your PR and assign them. When your PR has been assigned reviewers contact them to get your code reviewed and approved via:
Your reviewer(s) will have the following roles:
Read our CONTRIBUTING.md file. Most importantly:
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 98.50%. Comparing base (
c0468a4
) to head (84ea9fb
). Report is 581 commits behind head on develop.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@gautam-divyanshu in ActionItem.ts
, shall we also change relatedEventId to eventId
like you did for organizationId
@palisadoes would like you get your view on that
hall we also chan
@tasneemkoushar Please confirm if it is AgendaItem.ts
because I changed it for AgendaItem.ts
, according to me it won't matter because I changed organization to organizationId because for other file for this feature have organizationId, so to work this , I have to change
hall we also chan
@tasneemkoushar Please confirm if it is
AgendaItem.ts
because I changed it forAgendaItem.ts
, according to me it won't matter because I changed organization to organizationId because for other file for this feature have organizationId, so to work this , I have to change
yeah @gautam-divyanshu I meant AgendaItem.ts
@gautam-divyanshu LGTM apart from that minor comment. I am approving this PR but lets wait for @palisadoes review once on that minor change
@gautam-divyanshu LGTM apart from that minor comment. I am approving this PR but lets wait for @palisadoes review once on that minor change
ok
@palisadoes Can we merge this?
I have to create other PRs that depend on it.
What kind of change does this PR introduce? Query implementation
Issue Number:
Fixes #2345
Did you add tests for your changes?
Snapshots/Videos:
If relevant, did you update the documentation?
Summary
Does this PR introduce a breaking change?
Other information
Have you read the contributing guide?
Summary by CodeRabbit
New Features
agendaItemByEvent
andagendaItemByOrganization
to fetch agenda items based on event or organization.Tests
agendaItemByEvent
to verify fetching items by event.agendaItemByOrganization
to verify fetching items by organization.