From 0bb6411ee9fce02c2e5680f2be5740a1bbb508ad Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Fri, 24 Dec 2021 15:35:33 +0100 Subject: chore: replace CV content with mdx content Since I replace the other pages, there is no reason to fetch this page content through WP GraphQL. --- src/services/graphql/queries.ts | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'src/services') diff --git a/src/services/graphql/queries.ts b/src/services/graphql/queries.ts index 518cf75..a40446e 100644 --- a/src/services/graphql/queries.ts +++ b/src/services/graphql/queries.ts @@ -1,7 +1,6 @@ import { Slug } from '@ts/types/app'; import { Article, PostBy } from '@ts/types/articles'; import { AllPostsSlug, PostsList, RawPostsList } from '@ts/types/blog'; -import { Page, PageBy } from '@ts/types/pages'; import { AllSubjectsSlug, AllThematicsSlug, @@ -11,7 +10,6 @@ import { ThematicBy, } from '@ts/types/taxonomies'; import { - getFormattedPage, getFormattedPost, getFormattedPostPreview, getFormattedSubject, @@ -233,32 +231,6 @@ export const getPostBySlug = async (slug: string): Promise
=> { return post; }; -//============================================================================== -// Pages query -//============================================================================== - -export const getPageByUri = async (slug: string): Promise => { - const query = gql` - query PageByUri($slug: String!) { - pageBy(uri: $slug) { - contentParts { - afterMore - beforeMore - } - date - modified - title - } - } - `; - - const variables = { slug }; - const response = await fetchApi(query, variables); - const page = getFormattedPage(response.pageBy); - - return page; -}; - //============================================================================== // Subject query //============================================================================== -- cgit v1.2.3