Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
ieaves committed Aug 17, 2023
2 parents 05a2f90 + c184777 commit 8e198ad
Show file tree
Hide file tree
Showing 30 changed files with 816 additions and 545 deletions.
1 change: 1 addition & 0 deletions grai-frontend/__generated__/globalTypes.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions grai-frontend/src/components/home/HomeCards.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ test("renders", async () => {
filtered: 38,
},
},
tables: {
nodes: {
meta: {
total: 2,
filtered: 2,
},
},
connections: {
Expand Down
6 changes: 3 additions & 3 deletions grai-frontend/src/components/home/HomeCards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ export const GET_COUNTS = gql`
filtered
}
}
tables {
nodes(filters: { node_type: { equals: "Table" } }) {
meta {
total
filtered
}
}
connections {
Expand Down Expand Up @@ -51,7 +51,7 @@ const HomeCards: React.FC = () => {
{error && <GraphError error={error} />}
<Grid item md={3}>
<HomeCard
count={data?.workspace.tables.meta.total}
count={data?.workspace.nodes.meta.filtered}
text="Tables"
color="#8338EC"
to="tables"
Expand Down
12 changes: 6 additions & 6 deletions grai-frontend/src/components/home/__generated__/GetCountsHome.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions grai-frontend/src/components/tables/TableEvents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const GET_TABLE_EVENTS = gql`
) {
workspace(organisationName: $organisationName, name: $workspaceName) {
id
table(id: $tableId) {
node(id: $tableId) {
id
events {
data {
Expand Down Expand Up @@ -72,7 +72,7 @@ const TableEvents: React.FC<TableEventsProps> = ({ table, responsive }) => {
if (error) return <GraphError error={error} />
if (loading) return <Loading />

const tableData = data?.workspace?.table
const tableData = data?.workspace?.node

if (!tableData) return <NotFound />

Expand Down
26 changes: 13 additions & 13 deletions grai-frontend/src/components/tables/__generated__/GetTableEvents.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions grai-frontend/src/pages/Home.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,9 @@ test("no reports", async () => {
filtered: 0,
},
},
tables: {
nodes: {
meta: {
total: 0,
filtered: 0,
},
},
connections: {
Expand Down
6 changes: 3 additions & 3 deletions grai-frontend/src/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ export const GET_WORKSPACE = gql`
filtered
}
}
tables {
nodes(filters: { node_type: { equals: "Table" } }) {
meta {
total
filtered
}
}
connections {
Expand Down Expand Up @@ -88,7 +88,7 @@ const Home: React.FC = () => {
<WelcomeCard search={search} setSearch={setSearch} />
<HomeCards />
{workspace.connections.meta.total === 0 &&
workspace.tables.meta.total === 0 && <GettingStarted />}
workspace.nodes.meta.filtered === 0 && <GettingStarted />}
<ReportsCard />
<SourceGraph workspaceId={workspace.id} />
</Box>
Expand Down
12 changes: 6 additions & 6 deletions grai-frontend/src/pages/__generated__/GetWorkspaceHome.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion grai-frontend/src/pages/edges/Edges.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const GET_EDGES = gql`
edges(
pagination: { limit: 20, offset: $offset }
search: $search
filter: $filter
filters: $filter
) {
data {
id
Expand Down
2 changes: 1 addition & 1 deletion grai-frontend/src/pages/nodes/Nodes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const GET_NODES = gql`
nodes(
pagination: { limit: 20, offset: $offset }
search: $search
filter: $filter
filters: $filter
order: $order
) {
data {
Expand Down
14 changes: 12 additions & 2 deletions grai-frontend/src/testing/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@
"defaultValue": null
},
{
"name": "filter",
"name": "filters",
"description": null,
"type": {
"kind": "INPUT_OBJECT",
Expand Down Expand Up @@ -359,7 +359,7 @@
"defaultValue": null
},
{
"name": "filter",
"name": "filters",
"description": null,
"type": {
"kind": "INPUT_OBJECT",
Expand Down Expand Up @@ -1526,6 +1526,16 @@
},
"defaultValue": null
},
{
"name": "metadata__grai__node_type",
"description": null,
"type": {
"kind": "ENUM",
"name": "Ordering",
"ofType": null
},
"defaultValue": null
},
{
"name": "is_active",
"description": null,
Expand Down
Loading

0 comments on commit 8e198ad

Please sign in to comment.