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 derived measures to GraphQL #1241

Merged
merged 8 commits into from
Dec 7, 2024
Merged

Conversation

shangyian
Copy link
Contributor

@shangyian shangyian commented Dec 6, 2024

Summary

This change makes the derived measures metadata from #1234 available to query via GraphQL. For example:

query ListNodes($namespace: String, $nodeTypes: [NodeType!], $tags: [String!], $editedBy: String, $after: String, $limit: Int) {
  findNodesPaginated(
    namespace: $namespace
    nodeTypes: $nodeTypes
    tags: $tags
    editedBy: $editedBy
    limit: $limit
    after: $after
  ) {
    edges {
      node {
        name
        type
        current {
          extractedMeasures {
            measures {
              name
              expression
              aggregation
              rule {
                type
              }
            }
            derivedQuery
            derivedExpression
          }
        }
      }
    }
    pageInfo {
      startCursor
      endCursor
      hasNextPage
      hasPrevPage
    }
  }
}

Test Plan

Deployment Plan

N/A

Copy link

netlify bot commented Dec 6, 2024

Deploy Preview for thriving-cassata-78ae72 canceled.

Name Link
🔨 Latest commit b29b502
🔍 Latest deploy log https://app.netlify.com/sites/thriving-cassata-78ae72/deploys/6753fa4ee4a0750008030adf

@shangyian shangyian marked this pull request as ready for review December 6, 2024 15:36
Copy link
Member

@agorajek agorajek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We talked about having the derivedQuery and derivedExpression instead, but I assume we can change this later.

@shangyian shangyian merged commit d7ce96f into DataJunction:main Dec 7, 2024
16 checks passed
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.

2 participants