Skip to content

Conversation

Emile-Filteau
Copy link
Contributor

@Emile-Filteau Emile-Filteau commented Sep 2, 2025

Check List

  • Tests have been run in packages where changes made if available
  • Linter has been run for changed code
  • Tests for the changes have been added if not covered yet
  • Docs have been added / updated if required

Issue Reference this PR resolves

Fixes #6972

Description of Changes Made (if issue reference is not provided)

When querying a null TimeDimension through GraphQL, Cube returns a Cannot return null value for non-nullable field. When querying through the playground, fetching the value of a TimeDimension can return a null value if the underlying date column is null. The GraphQL tab of the playground also outputs a query that will crash if ran against the GraphQL API that looks like this :

query CubeQuery {
  cube {
    my_cube {
      id
      my_date {
        value // <---- will crash with the linked error
      }
    }
  }
}

I'm not sure if there are underlying implications of doing this, let me know if it does not makes sense.

@Emile-Filteau Emile-Filteau requested a review from a team as a code owner September 2, 2025 13:20
@github-actions github-actions bot added the pr:community Contribution from Cube.js community members. label Sep 2, 2025
@Emile-Filteau Emile-Filteau changed the title Make TimeDimension fields nullable feat(api): Make TimeDimension fields nullable Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:community Contribution from Cube.js community members.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nullable TimeDimension creates incorrect GraphQL errors
1 participant