From a0d00743cbbdb77b27c1a3d5711407ffed5befac Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Sat, 20 Aug 2022 21:39:51 +0200 Subject: refactor(types): move and rename GraphQL types The api file in services was not really readable. So I move the types and I also rewrite a little the fetch function. I also rename most of the type to avoid conflict with preexisting types (like Node) and to keep consistency. --- src/pages/blog/index.tsx | 2 +- src/pages/blog/page/[number].tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/pages/blog') diff --git a/src/pages/blog/index.tsx b/src/pages/blog/index.tsx index 3f7eefd..3be8a99 100644 --- a/src/pages/blog/index.tsx +++ b/src/pages/blog/index.tsx @@ -3,7 +3,6 @@ import PostsList from '@components/organisms/layout/posts-list'; import LinksListWidget from '@components/organisms/widgets/links-list-widget'; import { getLayout } from '@components/templates/layout/layout'; import PageLayout from '@components/templates/page/page-layout'; -import { type EdgesResponse } from '@services/graphql/api'; import { getArticles, getTotalArticles } from '@services/graphql/articles'; import { getThematicsPreview, @@ -11,6 +10,7 @@ import { } from '@services/graphql/thematics'; import { getTopicsPreview, getTotalTopics } from '@services/graphql/topics'; import { type NextPageWithLayout } from '@ts/types/app'; +import { EdgesResponse } from '@ts/types/graphql/queries'; import { type RawArticle, type RawThematicPreview, diff --git a/src/pages/blog/page/[number].tsx b/src/pages/blog/page/[number].tsx index 1e1240a..e72eb9a 100644 --- a/src/pages/blog/page/[number].tsx +++ b/src/pages/blog/page/[number].tsx @@ -2,7 +2,6 @@ import PostsList from '@components/organisms/layout/posts-list'; import LinksListWidget from '@components/organisms/widgets/links-list-widget'; import { getLayout } from '@components/templates/layout/layout'; import PageLayout from '@components/templates/page/page-layout'; -import { type EdgesResponse } from '@services/graphql/api'; import { getArticles, getArticlesEndCursor, @@ -14,6 +13,7 @@ import { } from '@services/graphql/thematics'; import { getTopicsPreview, getTotalTopics } from '@services/graphql/topics'; import { type NextPageWithLayout } from '@ts/types/app'; +import { EdgesResponse } from '@ts/types/graphql/queries'; import { type RawArticle, type RawThematicPreview, -- cgit v1.2.3