Skip to content

Conversation

@cimandef
Copy link
Contributor

@cimandef cimandef commented Feb 10, 2026

here we change the code to support the new gql contract
for the viewer query

Summary by CodeRabbit

New Features

  • Competition team request management with messaging capabilities
  • Workspace and workspace runner management system
  • Dataset versioning enhancements including DOI and description fields
  • Tags support for competitions and datasets
  • Enhanced access control capabilities across entities and organizations
  • Public dataset identification feature

@cimandef cimandef self-assigned this Feb 10, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 10, 2026

📝 Walkthrough

Walkthrough

The PR extends the GraphQL schema with new types for competition team requests and workspace management, adds access control fields to entities, introduces dataset versioning enhancements with DOI support, refactors viewer context handling in CLI commands, and updates GraphQL queries to include type information.

Changes

Cohort / File(s) Summary
Schema Type Definitions
schema.graphql
Added CompetitionTeamRequest, Workspace, WorkspaceRunner, and related connection types. Introduced RunnerCommand and DatasetVersionStatus enums. Extended Competition, CompetitionMembership, DatasetVersion, and Entity with new fields (createdAt, viewerCan, asEntity, description, doi, workspace). Added Entity.can and Organization.can access control fields. Replaced tagIds with tags: [String!]! across inputs. Modified DatasetVersionAuthor union to include UnregisteredUser type.
Viewer Context Handling
src/commands/dataset/new.rs
Refactored ask_dataset_owner to derive possible owners from viewer context using type-specific enum matching on viewer.on instead of directly accessing viewer.entities.nodes, with filtering to exclude the viewer.
GraphQL Query Enhancements
src/graphql/get_viewer_related_entities.graphql, src/graphql/latest_submission_version.graphql, src/graphql/viewer_info.graphql
Added __typename field to viewer selections. Restructured get_viewer_related_entities to gate entities selection behind User-type fragment, wrapping nodes selection under type-specific path.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Suggested reviewers

  • jpopesculian

Poem

🐰 New types bloom in schema's garden fair,
Workspaces dance with competitions rare,
Access control spreads its gentle wings,
DataDOI and versioning—such grand things!
Viewers now know their truest type,
A schema ripe and ready, fully hype!

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'fix: dataset new command' is vague and does not clearly convey the main change—updating code to support a new GraphQL contract for the viewer query. Make the title more specific about the GraphQL schema update, such as 'fix: update dataset new command for viewer GraphQL contract' or 'update viewer query handling for new GraphQL schema'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch angel/update_graphql_schema

No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
schema.graphql (1)

3412-3420: Workspace.viewer field name shadows the root Query.viewer field.

The Workspace type has a field named viewer (Line 3418) that returns WorkspaceRunner, while the root Query.viewer returns Entity!. While GraphQL scoping prevents actual ambiguity, this could cause confusion for developers writing queries. Consider whether a more descriptive name (e.g., viewerRunner) would be clearer.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

here we change the code to support the new gql contract
for the `viewer` query
@cimandef cimandef force-pushed the angel/update_graphql_schema branch from 198c826 to f0a3071 Compare February 10, 2026 19:40
@cimandef cimandef merged commit 4cbf2b4 into main Feb 10, 2026
21 of 22 checks passed
@cimandef cimandef deleted the angel/update_graphql_schema branch February 10, 2026 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant