Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new dimension types #227

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Add new dimension types #227

wants to merge 5 commits into from

Conversation

jstcki
Copy link
Contributor

@jstcki jstcki commented Nov 25, 2021

Adds support for ordinal and geographical dimensions

  • Consolidates Nominal/Ordinal Dimensions into CategoricalDimension with hasOrder property
  • Adds GeoShape and GeoPoint Dimensions
  • Adds position to dimension values (optional, only used when dimension is marked as ordinal)
  • Moves properties to specific dimension types (like unit)

To do:

  • Fix type errors
  • Implement resolvers

@jstcki jstcki temporarily deployed to visualize-ad-ordinal-di-63yues November 25, 2021 08:33 Inactive
@sosiology sosiology added this to In progress in Sprint 3.2 Nov 25, 2021
@jstcki jstcki marked this pull request as ready for review November 29, 2021 10:48
@jstcki jstcki temporarily deployed to visualize-ad-ordinal-di-bgybsk November 30, 2021 09:12 Inactive
…ategorical, GeoShape, GeoPoint dimensions, rename fragments

Categorical, GeoShape, GeoPoint are all categorical, so they now implement a shared interface (which basically means that they have a `values` field, which Temporal and Measure dimensions don't have).

Also separates the inline fragments for different dimension types to named fragments, so they can be used in TypeScript. I also renamed them for more clarity (<type>MetaData -> <type>Fields).

Adds typeguards for these new types to domain/data.ts

Note: Ignore the generated query-hooks and resolvers-types files in review!
@jstcki jstcki temporarily deployed to visualize-ad-ordinal-di-sqzfkf December 2, 2021 10:20 Inactive
(Just pushing to review later)
@jstcki jstcki temporarily deployed to visualize-ad-ordinal-di-fb751t December 2, 2021 15:40 Inactive
@jstcki jstcki marked this pull request as draft December 2, 2021 16:28
@jstcki
Copy link
Contributor Author

jstcki commented Dec 2, 2021

Discussed with @ptbrowne that we're not aiming to merge this PR but treat it as an exploration to be reviewed and maybe be used for reference in a future refactor of the GraphQL schema. Support for ordinal dimension will follow a more simple approach that doesn't impact the code base as extensively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Sprint 3.2
In progress
Development

Successfully merging this pull request may close these issues.

None yet

1 participant