twentyhq / twenty

Building a modern alternative to Salesforce, powered by the community.
https://twenty.com
Other
17.48k stars 2.06k forks source link

Error: Field "position" is not defined in "WorkspaceMemberOrderByInput". #7427

Open harshit078 opened 2 weeks ago

harshit078 commented 2 weeks ago

[!Caution]

  • When accessing properites such as Accout owner, an error is thrown GraphQL Error "Field "position" is not defined by type "WorkspaceMemberOrderByInput"
    • This issue is seems related to issue #7426

Current behavior

https://github.com/user-attachments/assets/0e5566a7-5d92-4a65-8793-06dedbc386c8

harshit078 commented 2 weeks ago

One possible approach to this issue can be that since we are trying to access Position field from WorkspaceMemberOrderByInput in graphQL schema which doesn't have Position defined in it. We can add position?: InputMaybe<OrderByDirection>; and keep it optional which will not log errors on both Sentry and Ts console.

Utzig26 commented 2 weeks ago

I could work on it, please assign this issue to me

FelixMalfait commented 3 days ago

@harshit078 good catch. WorkspaceMember is a system object. We used to have something hardcoded to disable the links, I think that's what we should do for now. In the future we might be able to display the system objects within the app, but that will require backend work (right now not all fields on WorkspaceMember can be edited without consequence)

FelixMalfait commented 3 days ago

/award 1000 (for creating all the mobile issues + this one + all the PRs)

oss-gg[bot] commented 3 days ago

Awarding harshit078: 1000 points 🕹️ Well done! Check out your new contribution on oss.gg/harshit078