-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[gql] Expose partition mapping on AssetDependency (#18119)
Adds backend support to resolve #15720 This PR exposes the partition mapping on `GrapheneAssetDependency`, which represents the "edge" in between an asset and its upstream. The partition mapping is only returned if it is defined on the asset (and not inferred). The reasoning here is to avoid introducing complexity in the UI when the user hasn't provided an explicit definition. It adds descriptions for partition mappings in case if we'd like to display that.
- Loading branch information
1 parent
b8ebe0a
commit c21b2af
Showing
12 changed files
with
222 additions
and
2 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
js_modules/dagster-ui/packages/ui-core/src/graphql/schema.graphql
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
29 changes: 29 additions & 0 deletions
29
js_modules/dagster-ui/packages/ui-core/src/graphql/types.ts
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
python_modules/dagster-graphql/dagster_graphql/schema/partition_mappings.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import graphene | ||
from dagster._core.definitions.partition_mapping import PartitionMapping | ||
|
||
|
||
class GraphenePartitionMapping(graphene.ObjectType): | ||
className = graphene.NonNull(graphene.String) | ||
description = graphene.NonNull(graphene.String) | ||
|
||
class Meta: | ||
name = "PartitionMapping" | ||
|
||
def __init__( | ||
self, | ||
partition_mapping: PartitionMapping, | ||
): | ||
super().__init__( | ||
className=type(partition_mapping).__name__, | ||
description=partition_mapping.description, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
c21b2af
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deploy preview for dagit-core-storybook ready!
✅ Preview
https://dagit-core-storybook-lceqvd6e4-elementl.vercel.app
Built with commit c21b2af.
This pull request is being automatically deployed with vercel-action