From 12df6dba3b8bf61d89594a6c7e0a10f79040ba19 Mon Sep 17 00:00:00 2001 From: anuveyatsu Date: Sat, 14 Aug 2021 23:22:17 +0600 Subject: [PATCH] [catalog/query][xs]: fixed OrgInfo component of dataset page to re-use get dataset query as it doesn't need full org information. Updated get dataset query to follow frictionless spec. --- examples/catalog/components/dataset/Org.tsx | 4 ++-- examples/catalog/graphql/queries.ts | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/catalog/components/dataset/Org.tsx b/examples/catalog/components/dataset/Org.tsx index a3fec592..22c6a3c0 100644 --- a/examples/catalog/components/dataset/Org.tsx +++ b/examples/catalog/components/dataset/Org.tsx @@ -1,10 +1,10 @@ import { useQuery } from '@apollo/react-hooks'; import { ErrorMessage } from '../_shared'; -import { GET_ORG_QUERY } from '../../graphql/queries'; +import { GET_DATASET_QUERY } from '../../graphql/queries'; import { Org } from 'portal'; const OrgInfo: React.FC<{ variables: any }> = ({ variables }) => { - const { loading, error, data } = useQuery(GET_ORG_QUERY, { + const { loading, error, data } = useQuery(GET_DATASET_QUERY, { variables, // Setting this value to true will make the component rerender when // the "networkStatus" changes, so we are able to know if it is fetching diff --git a/examples/catalog/graphql/queries.ts b/examples/catalog/graphql/queries.ts index 0523dd30..ad22e5b1 100644 --- a/examples/catalog/graphql/queries.ts +++ b/examples/catalog/graphql/queries.ts @@ -67,7 +67,7 @@ export const SEARCH_QUERY = gql` results { name title - metadata_modified + updated: metadata_modified organization { name title @@ -138,19 +138,19 @@ export const GET_DATASET_QUERY = gql` name title size - metadata_created - metadata_modified + created: metadata_created + updated: metadata_modified resources { name title format created - last_modified + updated: last_modified } organization { name title - image_url + image: image_url } } }