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

Fix graphql conflict between role custom object and role dto #10479

Merged
merged 1 commit into from
Feb 25, 2025

Conversation

Weiko
Copy link
Member

@Weiko Weiko commented Feb 25, 2025

Context

Following the strategy where we want to block custom object creation when the type is reserved by core objects. The issue happened again with the recently introduced role table.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR adds role-related objects and other missing core object names to the reserved keywords list to prevent GraphQL conflicts.

  • Added 'role', 'roles', 'userWorkspaceRole', 'userWorkspaceRoles' to coreObjectNames in validate-object-metadata-input.util.ts
  • Added singular forms of existing core objects for consistency
  • Reorganized the core object names list for better maintainability
  • Prevents users from creating custom objects with names that would conflict with system objects
  • Resolves potential GraphQL schema conflicts between custom objects and system DTOs

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

Copy link
Contributor

@prastoin prastoin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice thank you so much !
This is a lot of new values
Maybe we should code-generate this list to keep it synched to the reality ? Or maybe we could have a TypeScript linting over existing Standard object names and retrieve a literal we could use to cover all use cases ?
What do you think ?

@Weiko Weiko merged commit 589a0c7 into main Feb 25, 2025
35 checks passed
@Weiko Weiko deleted the c--fix-role-conflict-with-custom-object branch February 25, 2025 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants