#import "./user.fragment.graphql"

query searchUsers($fullPath: ID!, $search: String, $isProject: Boolean = false) {
  group(fullPath: $fullPath) @skip(if: $isProject) {
    groupMembers(search: $search) {
      nodes {
        user {
          ...User
        }
      }
    }
  }
  project(fullPath: $fullPath) @include(if: $isProject) {
    projectMembers(search: $search) {
      nodes {
        user {
          ...User
        }
      }
    }
  }
}
