diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-09-20 16:38:54 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-09-20 16:38:54 +0200 |
| commit | f861e6a269ba9f62700776d3cd13b644a9e836d4 (patch) | |
| tree | a5a107e7a6e4ff8b4261fe04349357bc00b783ee /src/types | |
| parent | 03331c44276ec56e9f235e4d5ee75030455a753f (diff) | |
refactor: use named export for everything except pages
Next expect a default export for pages so only those components should
use default exports. Everything else should use named exports to
reduce the number of import statements.
Diffstat (limited to 'src/types')
| -rw-r--r-- | src/types/graphql/index.ts | 3 | ||||
| -rw-r--r-- | src/types/graphql/mutations.ts | 3 | ||||
| -rw-r--r-- | src/types/graphql/queries.ts | 12 | ||||
| -rw-r--r-- | src/types/index.ts | 5 |
4 files changed, 13 insertions, 10 deletions
diff --git a/src/types/graphql/index.ts b/src/types/graphql/index.ts new file mode 100644 index 0000000..79eb05e --- /dev/null +++ b/src/types/graphql/index.ts @@ -0,0 +1,3 @@ +export * from './generics'; +export * from './mutations'; +export * from './queries'; diff --git a/src/types/graphql/mutations.ts b/src/types/graphql/mutations.ts index 581a46e..6ff066c 100644 --- a/src/types/graphql/mutations.ts +++ b/src/types/graphql/mutations.ts @@ -1,5 +1,4 @@ -import { sendCommentMutation } from '../../services/graphql/comments.mutation'; -import { sendMailMutation } from '../../services/graphql/contact.mutation'; +import { sendCommentMutation, sendMailMutation } from '../../services/graphql'; //=========================================================================== // Existing mutations list diff --git a/src/types/graphql/queries.ts b/src/types/graphql/queries.ts index fceae30..83e9c67 100644 --- a/src/types/graphql/queries.ts +++ b/src/types/graphql/queries.ts @@ -4,21 +4,17 @@ import { articlesEndCursorQuery, articlesQuery, articlesSlugQuery, - totalArticlesQuery, -} from '../../services/graphql/articles.query'; -import { commentsQuery } from '../../services/graphql/comments.query'; -import { + commentsQuery, thematicBySlugQuery, thematicsListQuery, thematicsSlugQuery, - totalThematicsQuery, -} from '../../services/graphql/thematics.query'; -import { topicBySlugQuery, topicsListQuery, topicsSlugQuery, + totalArticlesQuery, + totalThematicsQuery, totalTopicsQuery, -} from '../../services/graphql/topics.query'; +} from '../../services/graphql'; import { Slug } from '../app'; import { RawComment } from '../raw-data'; import { diff --git a/src/types/index.ts b/src/types/index.ts new file mode 100644 index 0000000..c9820db --- /dev/null +++ b/src/types/index.ts @@ -0,0 +1,5 @@ +export * from './app'; +export * from './graphql'; +export * from './mdx'; +export * from './raw-data'; +export * from './swr'; |
