mirror of
https://github.com/graphql-hive/console
synced 2026-05-23 00:58:36 +00:00
fix(app): show insight not found instead of loading (#6593)
This commit is contained in:
parent
ec1238d14f
commit
ef1efbb8c2
2 changed files with 11 additions and 2 deletions
5
.changeset/itchy-grapes-do.md
Normal file
5
.changeset/itchy-grapes-do.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'hive': patch
|
||||
---
|
||||
|
||||
Fix operation insights showing loading for missing operations
|
||||
|
|
@ -33,7 +33,7 @@ function GraphQLOperationBody(props: {
|
|||
return <GraphQLHighlight className="pt-6" code={operation.body} />;
|
||||
}
|
||||
|
||||
return <div>Loading...</div>;
|
||||
return <div>Operation not found.</div>;
|
||||
}
|
||||
|
||||
const Operation_View_OperationBodyQuery = graphql(`
|
||||
|
|
@ -147,7 +147,11 @@ function OperationView({
|
|||
)}
|
||||
<div className="mt-12 w-full rounded-md border border-gray-800 bg-gray-900/50 p-5">
|
||||
<Section.Title>Operation body</Section.Title>
|
||||
<GraphQLOperationBody operation={result.data?.target?.operation ?? null} />
|
||||
{result.fetching ? (
|
||||
<div>Loading...</div>
|
||||
) : (
|
||||
<GraphQLOperationBody operation={result.data?.target?.operation ?? null} />
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue