Add state to MCP profile and refactor contract filter
Add the profile state attribute (ACTIVE/INACTIVE) to the MCP Profile schema so listUsers and getUser tools expose it, and add a state filter to listUsers. Rename excludeContractEnded to contractEnded across the entire stack (MCP, GraphQL, CLI, frontend). The new boolean is two-way: true returns only users with ended contracts, false returns only users with active or no contract, and null returns all. Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -30,7 +30,7 @@ func (r *identityResolver) Profiles(ctx context.Context, obj *types.Identity, fi
|
||||
|
||||
filters := coredata.NewMembershipProfileFilter(nil).WithMembership()
|
||||
if filter != nil {
|
||||
filters = coredata.NewMembershipProfileFilter(filter.ExcludeContractEnded).WithMembership()
|
||||
filters = coredata.NewMembershipProfileFilter(filter.ContractEnded).WithMembership()
|
||||
if filter.State != nil {
|
||||
filters.WithState(*filter.State)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user