mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-17 21:14:34 +00:00
40 lines
1.2 KiB
TypeScript
40 lines
1.2 KiB
TypeScript
import { Chart } from '../../types.generated';
|
|
import { findChartByURN } from '../fixtures/searchResult/chartSearchResult';
|
|
|
|
type GetChart = {
|
|
data: {
|
|
chart: Chart;
|
|
};
|
|
};
|
|
|
|
export const getChartResolver = {
|
|
getChart({ variables: { urn } }): GetChart {
|
|
const chart = findChartByURN(urn) as Chart;
|
|
return {
|
|
data: {
|
|
chart: Object.assign(chart, {
|
|
info: {
|
|
...chart.info,
|
|
inputs: [],
|
|
customProperties: [],
|
|
lastRefreshed: null,
|
|
created: {
|
|
time: 1619160920,
|
|
__typename: 'AuditStamp',
|
|
},
|
|
},
|
|
query: null,
|
|
downstreamLineage: {
|
|
entities: [],
|
|
__typename: 'DownstreamEntityRelationships',
|
|
},
|
|
upstreamLineage: {
|
|
entities: [],
|
|
__typename: 'UpstreamEntityRelationships',
|
|
},
|
|
}),
|
|
},
|
|
};
|
|
},
|
|
};
|