Skip to content
This repository was archived by the owner on Nov 1, 2024. It is now read-only.

Commit 3e9cb1d

Browse files
committed
remove search graphql
1 parent 58474f0 commit 3e9cb1d

File tree

9 files changed

+13
-328
lines changed

9 files changed

+13
-328
lines changed

lib/queries/search/resultCount.tsx

-10
This file was deleted.

lib/queries/search/searchResult.ts

-35
This file was deleted.

lib/queries/search/searchResultWithOptions.ts

-48
This file was deleted.

lib/schema/graphql.ts

+13-172
Large diffs are not rendered by default.

pages/dataproduct/new.tsx

-20
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@ import * as React from 'react'
22
import { NewDataproductForm } from '../../components/dataproducts/newDataproductForm'
33
import Head from 'next/head'
44
import {
5-
SearchContentDocument,
65
useUserInfoDetailsQuery,
76
} from '../../lib/schema/graphql'
8-
import { GetServerSideProps } from 'next'
9-
import { addApolloState, initializeApollo } from '../../lib/apollo'
107
import InnerContainer from '../../components/lib/innerContainer'
118
import LoaderSpinner from '../../components/lib/spinner'
129

@@ -36,20 +33,3 @@ const NewDataproduct = () => {
3633
}
3734

3835
export default NewDataproduct
39-
40-
export const getServerSideProps: GetServerSideProps = async () => {
41-
const apolloClient = initializeApollo()
42-
43-
try {
44-
await apolloClient.query({
45-
query: SearchContentDocument,
46-
variables: { q: { limit: 6 } },
47-
})
48-
} catch (e) {
49-
console.log(e)
50-
}
51-
52-
return addApolloState(apolloClient, {
53-
props: {},
54-
})
55-
}

pages/index.tsx

-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { addApolloState, initializeApollo } from '../lib/apollo'
33
import {
44
KeywordsDocument,
55
MetabaseProudctsDocument,
6-
SearchContentDocument,
76
} from '../lib/schema/graphql'
87
import { useRouter } from 'next/router'
98
import { FrontPageLogo } from '../components/index/frontPageLogo'
@@ -139,10 +138,6 @@ export const getServerSideProps: GetServerSideProps = async (context) => {
139138
await apolloClient.query({
140139
query: USER_INFO,
141140
})
142-
await apolloClient.query({
143-
query: SearchContentDocument,
144-
variables: { q: { limit: SEARCH_LIMIT } },
145-
})
146141
await apolloClient.query({
147142
query: MetabaseProudctsDocument,
148143
})

pages/insightProduct/new.tsx

-18
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import * as React from 'react'
22
import { NewInsightProductForm } from '../../components/insightProducts/newInsightProduct'
33
import Head from 'next/head'
44
import {
5-
SearchContentDocument,
65
useUserInfoDetailsQuery,
76
} from '../../lib/schema/graphql'
87
import { GetServerSideProps } from 'next'
@@ -36,20 +35,3 @@ const NewInsightProduct = () => {
3635
}
3736

3837
export default NewInsightProduct
39-
40-
export const getServerSideProps: GetServerSideProps = async () => {
41-
const apolloClient = initializeApollo()
42-
43-
try {
44-
await apolloClient.query({
45-
query: SearchContentDocument,
46-
variables: { q: { limit: 6 } },
47-
})
48-
} catch (e) {
49-
console.log(e)
50-
}
51-
52-
return addApolloState(apolloClient, {
53-
props: {},
54-
})
55-
}

pages/search.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import {
1313
KeywordsQuery,
1414
SearchType,
1515
useKeywordsQuery,
16-
useSearchContentWithOptionsQuery,
1716
} from '../lib/schema/graphql'
1817
import { useGetProductAreas } from '../lib/rest/productAreas'
1918
import { useSearch } from '../lib/rest/search'

pages/story/new.tsx

-19
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@ import * as React from 'react'
22
import { NewStoryForm } from '../../components/stories/newStory'
33
import Head from 'next/head'
44
import {
5-
SearchContentDocument,
65
useUserInfoDetailsQuery,
76
} from '../../lib/schema/graphql'
8-
import { GetServerSideProps } from 'next'
9-
import { addApolloState, initializeApollo } from '../../lib/apollo'
107
import InnerContainer from '../../components/lib/innerContainer'
118
import LoaderSpinner from '../../components/lib/spinner'
129

@@ -37,19 +34,3 @@ const NewStory = () => {
3734

3835
export default NewStory
3936

40-
export const getServerSideProps: GetServerSideProps = async () => {
41-
const apolloClient = initializeApollo()
42-
43-
try {
44-
await apolloClient.query({
45-
query: SearchContentDocument,
46-
variables: { q: { limit: 6 } },
47-
})
48-
} catch (e) {
49-
console.log(e)
50-
}
51-
52-
return addApolloState(apolloClient, {
53-
props: {},
54-
})
55-
}

0 commit comments

Comments
 (0)