fix(explorer): type generation broken in an oracle refactor (#2859)
This commit is contained in:
parent
710e2daa27
commit
faef98f0ae
@ -10,7 +10,7 @@ export type ExplorerOracleDataConnectionFragment = { __typename?: 'OracleSpec',
|
|||||||
export type ExplorerOracleSpecsQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
export type ExplorerOracleSpecsQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||||
|
|
||||||
|
|
||||||
export type ExplorerOracleSpecsQuery = { __typename?: 'Query', oracleSpecsConnection?: { __typename?: 'OracleSpecsConnection', pageInfo: { __typename?: 'PageInfo', hasNextPage: boolean }, edges?: Array<{ __typename?: 'OracleSpecEdge', node: { __typename?: 'OracleSpec', dataSourceSpec: { __typename?: 'ExternalDataSourceSpec', spec: { __typename?: 'DataSourceSpec', id: string, createdAt: any, updatedAt?: any | null, status: Types.DataSourceSpecStatus, data: { __typename?: 'DataSourceDefinition', sourceType: { __typename?: 'DataSourceDefinitionExternal', sourceType: { __typename?: 'DataSourceSpecConfiguration', signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null, filters?: Array<{ __typename?: 'Filter', key: { __typename?: 'PropertyKey', name?: string | null, type: Types.PropertyKeyType }, conditions?: Array<{ __typename?: 'Condition', value?: string | null, operator: Types.ConditionOperator }> | null }> | null } } | { __typename?: 'DataSourceDefinitionInternal', sourceType: { __typename?: 'DataSourceSpecConfigurationTime', conditions: Array<{ __typename?: 'Condition', value?: string | null, operator: Types.ConditionOperator } | null> } } } } }, dataConnection: { __typename?: 'OracleDataConnection', pageInfo: { __typename?: 'PageInfo', hasNextPage: boolean }, edges?: Array<{ __typename?: 'OracleDataEdge', node: { __typename?: 'OracleData', externalData: { __typename?: 'ExternalData', data: { __typename?: 'Data', matchedSpecIds?: Array<string> | null, broadcastAt: any, signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null, data?: Array<{ __typename?: 'Property', name: string, value: string }> | null } } } } | null> | null } } } | null> | null } | null };
|
export type ExplorerOracleSpecsQuery = { __typename?: 'Query', oracleSpecsConnection?: { __typename?: 'OracleSpecsConnection', pageInfo: { __typename?: 'PageInfo', hasNextPage: boolean }, edges?: Array<{ __typename?: 'OracleSpecEdge', node: { __typename?: 'OracleSpec', dataSourceSpec: { __typename?: 'ExternalDataSourceSpec', spec: { __typename?: 'DataSourceSpec', id: string, createdAt: any, updatedAt?: any | null, status: Types.DataSourceSpecStatus, data: { __typename?: 'DataSourceDefinition', sourceType: { __typename?: 'DataSourceDefinitionExternal', sourceType: { __typename?: 'DataSourceSpecConfiguration', signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null, filters?: Array<{ __typename?: 'Filter', key: { __typename?: 'PropertyKey', name?: string | null, type: Types.PropertyKeyType }, conditions?: Array<{ __typename?: 'Condition', value?: string | null, operator: Types.ConditionOperator }> | null }> | null } } | { __typename?: 'DataSourceDefinitionInternal', sourceType: { __typename?: 'DataSourceSpecConfigurationTime', conditions: Array<{ __typename?: 'Condition', value?: string | null, operator: Types.ConditionOperator } | null> } } } } } } } | null> | null } | null };
|
||||||
|
|
||||||
export type ExplorerOracleSpecByIdQueryVariables = Types.Exact<{
|
export type ExplorerOracleSpecByIdQueryVariables = Types.Exact<{
|
||||||
id: Types.Scalars['ID'];
|
id: Types.Scalars['ID'];
|
||||||
@ -73,7 +73,7 @@ export const ExplorerOracleDataSourceFragmentDoc = gql`
|
|||||||
`;
|
`;
|
||||||
export const ExplorerOracleDataConnectionFragmentDoc = gql`
|
export const ExplorerOracleDataConnectionFragmentDoc = gql`
|
||||||
fragment ExplorerOracleDataConnection on OracleSpec {
|
fragment ExplorerOracleDataConnection on OracleSpec {
|
||||||
dataConnection(pagination: {first: 1}) {
|
dataConnection {
|
||||||
pageInfo {
|
pageInfo {
|
||||||
hasNextPage
|
hasNextPage
|
||||||
}
|
}
|
||||||
@ -113,13 +113,11 @@ export const ExplorerOracleSpecsDocument = gql`
|
|||||||
edges {
|
edges {
|
||||||
node {
|
node {
|
||||||
...ExplorerOracleDataSource
|
...ExplorerOracleDataSource
|
||||||
...ExplorerOracleDataConnection
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
${ExplorerOracleDataSourceFragmentDoc}
|
${ExplorerOracleDataSourceFragmentDoc}`;
|
||||||
${ExplorerOracleDataConnectionFragmentDoc}`;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* __useExplorerOracleSpecsQuery__
|
* __useExplorerOracleSpecsQuery__
|
||||||
|
@ -22,7 +22,7 @@ export type SourceType =
|
|||||||
interface OracleDetailsProps {
|
interface OracleDetailsProps {
|
||||||
id: string;
|
id: string;
|
||||||
dataSource: ExplorerOracleDataSourceFragment;
|
dataSource: ExplorerOracleDataSourceFragment;
|
||||||
dataConnection: ExplorerOracleDataConnectionFragment;
|
dataConnection?: ExplorerOracleDataConnectionFragment;
|
||||||
// Defaults to false. Hides the count of 'broadcasts' this oracle has seen
|
// Defaults to false. Hides the count of 'broadcasts' this oracle has seen
|
||||||
showBroadcasts?: boolean;
|
showBroadcasts?: boolean;
|
||||||
}
|
}
|
||||||
@ -41,7 +41,8 @@ export const OracleDetails = ({
|
|||||||
showBroadcasts = false,
|
showBroadcasts = false,
|
||||||
}: OracleDetailsProps) => {
|
}: OracleDetailsProps) => {
|
||||||
const sourceType = dataSource.dataSourceSpec.spec.data.sourceType;
|
const sourceType = dataSource.dataSourceSpec.spec.data.sourceType;
|
||||||
const reportsCount: number = dataConnection.dataConnection.edges?.length || 0;
|
const reportsCount: number =
|
||||||
|
dataConnection?.dataConnection.edges?.length || 0;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
@ -63,7 +64,9 @@ export const OracleDetails = ({
|
|||||||
</TableRow>
|
</TableRow>
|
||||||
</TableWithTbody>
|
</TableWithTbody>
|
||||||
<OracleFilter data={dataSource} />
|
<OracleFilter data={dataSource} />
|
||||||
{showBroadcasts ? <OracleData data={dataConnection} /> : null}
|
{showBroadcasts && dataConnection ? (
|
||||||
|
<OracleData data={dataConnection} />
|
||||||
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -28,7 +28,7 @@ const Oracles = () => {
|
|||||||
<OracleDetails
|
<OracleDetails
|
||||||
id={id}
|
id={id}
|
||||||
dataSource={o?.node}
|
dataSource={o?.node}
|
||||||
dataConnection={o?.node}
|
showBroadcasts={false}
|
||||||
/>
|
/>
|
||||||
<details>
|
<details>
|
||||||
<summary className="pointer">JSON</summary>
|
<summary className="pointer">JSON</summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user