Closed duplixx closed 3 weeks ago
The recent changes introduce a new query eventsAttendedByUser
to the GraphQL schema, allowing retrieval of events attended by a user. Modifications include updates to the User
model, resolvers for handling the new query, and adjustments to the GraphQL types. This enhances the system's capability to track and query user event attendance efficiently.
File Path | Change Summary |
---|---|
schema.graphql |
Added eventsAttendedByUser query to the Query type. |
src/models/User.ts |
Updated InterfaceUser to include eventsAttended and modified userSchema to reference attended events. |
src/resolvers/Mutation/checkIn.ts |
Changed checkIn resolver to use $set and $addToSet for updating event attendance. |
src/resolvers/Query/eventsAttendedByUser.ts |
Added new resolver function eventsAttendedByUser to fetch attended events with sorting. |
src/resolvers/Query/index.ts |
Imported and added eventsAttendedByUser to Query resolvers. |
src/resolvers/Query/organizationsMemberConnection.ts |
Included eventsAttended field in user object processing. |
src/typeDefs/queries.ts |
Added eventsAttendedByUser to the exported queries. |
src/types/generatedGraphQLTypes.ts |
Updated Query type and added QueryEventsAttendedByUserArgs for the new query. |
sequenceDiagram
participant Client
participant Server
participant Database
Client->>Server: Query eventsAttendedByUser(id, orderBy)
Server->>Database: Fetch User with eventsAttended
Database-->>Server: Return User with populated events
Server-->>Client: Return sorted events list
In fields of code where rabbits play,
A new query hops in today.
To fetch the events a user attends,
With sorted lists, the fun extends.
Our schema grows, our models too,
Hopping forward, just for you! 🌟🐇
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:
@duplixx Please add the issue this is related to and fix failing tests.
it's draft PR for feature closing from here
What kind of change does this PR introduce?
Issue Number:
Fixes #
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
eventsAttendedByUser
to fetch events attended by a user.Enhancements
Bug Fixes