-
-
Notifications
You must be signed in to change notification settings - Fork 694
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
fixed the error while editing admin profile #2282
fixed the error while editing admin profile #2282
Conversation
WalkthroughThe pull request introduces modifications to several GraphQL queries for improved clarity and functionality. A new query, Changes
Assessment against linked issues
Possibly related PRs
Suggested reviewers
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
Our Pull Request Approval ProcessWe have these basic policies to make the approval process smoother for our volunteer team. Testing Your CodePlease 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. ReviewersDo not assign reviewers. Our Queue Monitors will review your PR and assign them.
Reviewing Your CodeYour reviewer(s) will have the following roles:
CONTRIBUTING.mdRead our CONTRIBUTING.md file. Most importantly:
Other
|
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.
Congratulations on making your first PR! 🎊 If you haven't already, check out our Contributing Guidelines and PR Reporting Guidelines to ensure that you are following our guidelines for contributing and creating PR.
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.
Actionable comments posted: 1
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (2)
- src/GraphQl/Queries/Queries.ts (1 hunks)
- src/components/LeftDrawerOrg/LeftDrawerOrg.tsx (1 hunks)
Additional comments not posted (1)
src/components/LeftDrawerOrg/LeftDrawerOrg.tsx (1)
54-54
: Verify if the GraphQL query accepts thecreatorId
parameter.The variable name in the
useQuery
hook has been changed fromid
tocreatorId
. Please ensure that the corresponding GraphQL query (ORGANIZATIONS_LIST
) has been updated to accept thecreatorId
parameter.Run the following script to verify the GraphQL query:
Verification successful
The GraphQL query has been correctly updated to accept the
creatorId
parameter.The ORGANIZATIONS_LIST query in
src/GraphQl/Queries/Queries.ts
has been modified to usecreatorId
instead ofid
, which aligns with the change in theLeftDrawerOrg
component. The import statement in the component file also confirms that it's using the updated query. This change is consistent and should work as intended.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify if the `ORGANIZATIONS_LIST` query accepts the `creatorId` parameter. # Test: Search for the `ORGANIZATIONS_LIST` query. Expect: The query should accept the `creatorId` parameter. rg --type graphql -A 5 $'query ORGANIZATIONS_LIST'Length of output: 83
Script:
#!/bin/bash # Description: Locate the ORGANIZATIONS_LIST query and verify if it accepts the creatorId parameter # Search for the ORGANIZATIONS_LIST query in all file types echo "Searching for ORGANIZATIONS_LIST query:" rg -i "query ORGANIZATIONS_LIST" -A 10 # If not found, search for potential .gql files echo -e "\nSearching for .gql files:" fd -e gql # Search for potential GraphQL query definitions in TypeScript files echo -e "\nSearching for GraphQL query definitions in TypeScript files:" rg -t ts "gql`\s*query ORGANIZATIONS_LIST" -A 10Length of output: 440
Script:
#!/bin/bash # Description: Broader search for ORGANIZATIONS_LIST query and GraphQL definitions # Search for partial matches of ORGANIZATIONS_LIST echo "Searching for partial matches of ORGANIZATIONS_LIST:" rg -i "ORGANIZATIONS_LIST" -A 10 # Search for GraphQL query definitions more broadly echo -e "\nSearching for GraphQL query definitions:" rg "gql`|gql\(|graphql`" -A 10 # List relevant file types that might contain GraphQL queries echo -e "\nListing relevant file types:" fd -e ts -e tsx -e js -e jsxLength of output: 188296
Please fix the failing tests |
Fixed the liniting errors now it shall pass the failing test |
@coderabbitai review |
Actions performedReview triggered.
|
Please fix the failing test |
@palisadoes to fix the failing tests i need to change a file in the Talawa-api so that i can define the creator id in the types and it can be handled properly. |
Thanks,
|
Without the change in API i cant fix the tests or issue |
Can i create a issue in api and fix that first? i guess that would help |
OK |
Created the issue can you please assign it to me |
|
|
This pull request did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please verify it has no conflicts with the develop branch and rebase if needed. Mention it now if you need help or give permission to other people to finish your work. |
@ARYANSHAH1567 Are you still working on this ?? |
Yes, I have created a issue in api regarding this, once that pr gets merged this issue will automatically be solved |
@palisadoes fixed all the issues and all tests are successful. So can you please review the pr and merge it |
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.
Actionable comments posted: 2
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (2)
- src/GraphQl/Queries/Queries.ts (1 hunks)
- src/components/LeftDrawerOrg/LeftDrawerOrg.tsx (1 hunks)
🧰 Additional context used
Please fix the failing tests |
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.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (2)
src/GraphQl/Queries/Queries.ts (2)
339-392
: LGTM! New queryORGANIZATIONS_LIST_BY_CREATOR_ID
looks good.The new query effectively addresses the PR objective by allowing filtering of organizations by
creatorId
. The structure and fields returned are comprehensive and appropriate for the use case.Consider adding a comment above the query to briefly explain its purpose and usage, which would enhance code readability and maintainability.
Renaming of existing queries not reflected
The old query names (
MEMBERS_LIST
,ORGANIZATIONS_LIST
,BLOCK_PAGE_MEMBER_LIST
,ORGANIZATIONS_MEMBER_CONNECTION_LIST
) are still present insrc/GraphQl/Queries/Queries.ts
. Please ensure that all intended query renamings have been correctly implemented.🔗 Analysis chain
Line range hint
1-393
: Verify renaming of existing queries.The AI summary mentions that several existing queries have been renamed for clarity (e.g.,
MEMBERS_LIST
toMembers
). However, these changes are not visible in the current diff. Please ensure that all intended query renamings have been implemented correctly.To confirm the query renaming, please run the following script:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for renamed queries in the file echo "Checking for renamed queries:" grep -n "query " src/GraphQl/Queries/Queries.ts echo "Checking for old query names:" grep -n "MEMBERS_LIST" src/GraphQl/Queries/Queries.ts grep -n "ORGANIZATIONS_LIST" src/GraphQl/Queries/Queries.ts grep -n "BLOCK_PAGE_MEMBER_LIST" src/GraphQl/Queries/Queries.ts grep -n "ORGANIZATIONS_MEMBER_CONNECTION_LIST" src/GraphQl/Queries/Queries.tsLength of output: 1623
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (2)
- src/GraphQl/Queries/Queries.ts (1 hunks)
- src/components/LeftDrawerOrg/LeftDrawerOrg.tsx (2 hunks)
🧰 Additional context used
🔇 Additional comments (3)
src/components/LeftDrawerOrg/LeftDrawerOrg.tsx (2)
3-3
: LGTM: Updated import statement for the new query.The import statement has been correctly updated to use the new
ORGANIZATIONS_LIST_BY_CREATOR_ID
query. This change aligns with the PR objectives and improves the specificity of the imported query.
Line range hint
18-24
: Implement the previously suggested prop updates.A previous review comment suggested updating the component props to use
creatorId
instead oforgId
. This change has not been implemented yet, but it's crucial for maintaining consistency with the new query structure.Please implement the following changes as suggested in the previous review:
- Update the component's props interface:
export interface InterfaceLeftDrawerProps { - orgId: string; + creatorId: string; targets: TargetsType[]; hideDrawer: boolean | null; setHideDrawer: React.Dispatch<React.SetStateAction<boolean | null>>; }
- Update the component's parameter destructuring:
const leftDrawerOrg = ({ targets, - orgId, + creatorId, hideDrawer, setHideDrawer, }: InterfaceLeftDrawerProps): JSX.Element => { // ... }
- Ensure that all usages of the
LeftDrawerOrg
component are updated to passcreatorId
instead oforgId
.Implementing these changes will ensure consistency across the codebase and prevent potential runtime issues.
Also applies to: 30-35
src/GraphQl/Queries/Queries.ts (1)
Line range hint
1-393
: Summary of changes and next steps
- The new
ORGANIZATIONS_LIST_BY_CREATOR_ID
query has been successfully added and addresses the PR objectives.- There's a discrepancy between the AI summary (which mentions renaming of existing queries) and the visible changes in the diff. This needs to be resolved.
Next steps:
- Add a brief comment explaining the purpose of the new
ORGANIZATIONS_LIST_BY_CREATOR_ID
query.- Verify and implement the renaming of existing queries as mentioned in the AI summary, if not already done.
- Update the PR description or comments to clarify the status of query renaming if it has been intentionally omitted or deferred.
Please confirm that all intended changes have been implemented and that the PR description accurately reflects the current state of the changes.
What kind of change does this PR introduce?
Bugfix
Issue Number:
Fixes #1924
It does not give error as CreatorId is being passed to the talawa-api so i will have to change a file in the api also so that it handles it correctly and then it will not throw error
Summary by CodeRabbit
New Features
Bug Fixes