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

fix: show insight not found instead of loading #6593

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/itchy-grapes-do.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'hive': patch
---

Fix operation insights showing loading for missing operations
8 changes: 6 additions & 2 deletions packages/web/app/src/pages/target-insights-operation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(`
Expand Down Expand Up @@ -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>
</>
);
Expand Down
Loading