Skip to content

Commit dc3b449

Browse files
committed
신규 graphql 클라이언트 구현
1 parent 257b704 commit dc3b449

File tree

160 files changed

+2893
-331
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+2893
-331
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
node_modules/
44

5+
.bifrost/
56
.glitch/
67
.svelte-kit/
78
.turbo/

apps/penxle.com/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"scripts": {
1010
"build": "vite build",
11-
"codegen": "svelte-kit sync && panda codegen && glitch generate",
11+
"codegen": "svelte-kit sync && panda codegen && bifrost codegen",
1212
"dev": "doppler run -- vite dev",
1313
"lint:svelte": "svelte-check --fail-on-warnings",
1414
"lint:typecheck": "tsc",
@@ -32,6 +32,7 @@
3232
"@opentelemetry/api": "^1.8.0",
3333
"@paralleldrive/cuid2": "^2.2.2",
3434
"@penxle/adapter-docker": "workspace:^",
35+
"@penxle/bifrost": "workspace:^",
3536
"@penxle/glitch": "workspace:^",
3637
"@penxle/lib": "workspace:^",
3738
"@pothos/core": "^3.41.0",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import type { Handle } from '@sveltejs/kit';
2+
3+
export const headers = (async ({ event, resolve }) => {
4+
return await resolve(event, {
5+
filterSerializedResponseHeaders: (name) => {
6+
if (name === 'content-type') {
7+
return true;
8+
}
9+
10+
return false;
11+
},
12+
});
13+
}) satisfies Handle;
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
export * from './headers';
12
export * from './logging';
23
export * from './maintenance';

apps/penxle.com/src/hooks/server.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { sequence } from '@sveltejs/kit/hooks';
22
import { building } from '$app/environment';
33
import { setupGlobals } from './common';
4-
import { logging } from './handles';
4+
import { headers, logging } from './handles';
55

66
export { handleError } from './common';
77

88
setupGlobals();
99

10-
export const handle = sequence(logging);
10+
export const handle = sequence(logging, headers);
1111

1212
if (!building) {
1313
await import('$lib/server/graphql/handler');

apps/penxle.com/src/lib/components/Avatar.svelte

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<script lang="ts">
2-
import { fragment, graphql } from '$glitch';
2+
import { fragment, graphql } from '$bifrost';
33
import { css } from '$styled-system/css';
44
import Image from './Image.svelte';
5-
import type { Avatar_profile } from '$glitch';
5+
import type { Avatar_profile } from '$bifrost';
66
import type { SystemStyleObject } from '$styled-system/types';
77
88
let _profile: Avatar_profile;

apps/penxle.com/src/lib/components/GridImage.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script lang="ts">
22
import { Image } from '$lib/components';
33
import { css, sva } from '$styled-system/css';
4-
import type { Image_image } from '$glitch';
4+
import type { Image_image } from '$bifrost';
55
import type { SystemStyleObject } from '$styled-system/types';
66
77
export let style: SystemStyleObject | undefined = undefined;

apps/penxle.com/src/lib/components/Image.svelte

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<script lang="ts">
22
import qs from 'query-string';
33
import CompactLogo from '$assets/logos/compact.svg?component';
4-
import { fragment, graphql } from '$glitch';
4+
import { fragment, graphql } from '$bifrost';
55
import { css } from '$styled-system/css';
6-
import type { Image_image } from '$glitch';
6+
import type { Image_image } from '$bifrost';
77
import type { SystemStyleObject } from '$styled-system/types';
88
99
type $$Props = {

apps/penxle.com/src/lib/components/PostCard.svelte

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
import IconBookmark from '~icons/tabler/bookmark';
55
import IconBookmarkFilled from '~icons/tabler/bookmark-filled';
66
import IconDotsVertical from '~icons/tabler/dots-vertical';
7-
import { fragment, graphql } from '$glitch';
7+
import { fragment, graphql } from '$bifrost';
88
import { mixpanel } from '$lib/analytics';
99
import { Avatar, Chip, Icon, Image, Tag } from '$lib/components';
1010
import { css } from '$styled-system/css';
1111
import { center, flex } from '$styled-system/patterns';
12-
import type { Feed_post } from '$glitch';
12+
import type { Feed_post } from '$bifrost';
1313
import type { SystemStyleObject } from '$styled-system/types';
1414
1515
let _post: Feed_post;
@@ -44,14 +44,14 @@
4444
...Image_image
4545
}
4646
47-
publishedRevision @_required {
47+
publishedRevision @required {
4848
id
4949
title
5050
previewText
5151
price
5252
}
5353
54-
space @_required {
54+
space @required {
5555
id
5656
slug
5757
name
@@ -62,7 +62,7 @@
6262
}
6363
}
6464
65-
member @_required {
65+
member @required {
6666
id
6767
6868
profile {

apps/penxle.com/src/lib/components/media/ThumbnailPicker.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script lang="ts">
22
import ky from 'ky';
33
import { createEventDispatcher } from 'svelte';
4-
import { graphql } from '$glitch';
4+
import { graphql } from '$bifrost';
55
import { Button, Modal } from '$lib/components';
66
import { trackable } from '$lib/svelte/store';
77
import { isValidImageFile, validImageMimes } from '$lib/utils';

apps/penxle.com/src/lib/components/pages/collections/CreateCollectionModal.svelte

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script lang="ts">
22
import mixpanel from 'mixpanel-browser';
33
import IconCamera from '~icons/tabler/camera';
4-
import { graphql } from '$glitch';
4+
import { graphql } from '$bifrost';
55
import { Icon, Image } from '$lib/components';
66
import { ThumbnailPicker } from '$lib/components/media';
77
import { Button, Modal } from '$lib/components/v2';
@@ -10,7 +10,7 @@
1010
import { UpdateSpaceCollectionSchema } from '$lib/validations';
1111
import { css } from '$styled-system/css';
1212
import { center } from '$styled-system/patterns';
13-
import type { Image_image } from '$glitch';
13+
import type { Image_image } from '$bifrost';
1414
1515
let thumbnailPicker: ThumbnailPicker;
1616
export let open = false;

apps/penxle.com/src/lib/components/pages/collections/ManageCollectionModal.svelte

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import dayjs from 'dayjs';
33
import mixpanel from 'mixpanel-browser';
44
import { page } from '$app/stores';
5-
import { fragment, graphql } from '$glitch';
5+
import { fragment, graphql } from '$bifrost';
66
import { Button, Modal } from '$lib/components';
77
import { Editable, PopupSearch } from '$lib/components/forms';
88
import Image from '$lib/components/Image.svelte';
@@ -13,7 +13,7 @@
1313
import type {
1414
SpaceCollectionsEntityPage_ManageCollectionModal_collection,
1515
SpaceCollectionsEntityPage_ManageCollectionModal_post,
16-
} from '$glitch';
16+
} from '$bifrost';
1717
1818
$: slug = $page.params.space;
1919
@@ -42,7 +42,7 @@
4242
...Image_image
4343
}
4444
45-
publishedRevision @_required {
45+
publishedRevision @required {
4646
id
4747
title
4848
}

apps/penxle.com/src/lib/components/pages/collections/UpdateCollectionModal.svelte

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<script lang="ts">
22
import mixpanel from 'mixpanel-browser';
33
import IconCamera from '~icons/tabler/camera';
4-
import { fragment, graphql } from '$glitch';
4+
import { fragment, graphql } from '$bifrost';
55
import { Button, Icon, Image, Modal } from '$lib/components';
66
import { FormField, TextInput } from '$lib/components/forms';
77
import { ThumbnailPicker } from '$lib/components/media';
88
import { createMutationForm } from '$lib/form';
99
import { UpdateSpaceCollectionSchema } from '$lib/validations';
1010
import { css, cx } from '$styled-system/css';
1111
import { center } from '$styled-system/patterns';
12-
import type { UpdateCollectionModal_Collection_query } from '$glitch';
12+
import type { UpdateCollectionModal_Collection_query } from '$bifrost';
1313
1414
let thumbnailPicker: ThumbnailPicker;
1515
export let open = false;

apps/penxle.com/src/lib/components/pages/posts/PostManageTable.svelte

+6-10
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import IconChevronDown from '~icons/tabler/chevron-down';
88
import IconPlus from '~icons/tabler/plus';
99
import IconTrash from '~icons/tabler/trash';
10-
import { fragment, graphql } from '$glitch';
10+
import { fragment, graphql } from '$bifrost';
1111
import { mixpanel } from '$lib/analytics';
1212
import { Avatar, Button, Chip, Icon, Image, Modal, Tag, Tooltip } from '$lib/components';
1313
import { Checkbox, Editable, Switch } from '$lib/components/forms';
@@ -16,12 +16,8 @@
1616
import { css } from '$styled-system/css';
1717
import { flex } from '$styled-system/patterns';
1818
import type { ChangeEventHandler } from 'svelte/elements';
19-
import type {
20-
PostManageTable_Collection,
21-
PostManageTable_Post_query,
22-
PostManageTable_SpaceMember,
23-
PostVisibility,
24-
} from '$glitch';
19+
import type { PostManageTable_Collection, PostManageTable_Post_query, PostManageTable_SpaceMember } from '$bifrost';
20+
import type { PostVisibility } from '$lib/enums';
2521
import type { PublishPostInput } from '$lib/validations/post';
2622
2723
const toolbarMenuOffset = 16;
@@ -67,13 +63,13 @@
6763
id
6864
}
6965
70-
space @_required {
66+
space @required {
7167
id
7268
name
7369
slug
7470
}
7571
76-
member @_required {
72+
member @required {
7773
id
7874
7975
profile {
@@ -83,7 +79,7 @@
8379
}
8480
}
8581
86-
publishedRevision @_required {
82+
publishedRevision @required {
8783
id
8884
title
8985
createdAt

apps/penxle.com/src/lib/const/feed.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ContentFilterCategory, PostCategory, PostPair } from '$glitch';
1+
import type { ContentFilterCategory, PostCategory, PostPair } from '$lib/enums';
22

33
export const filterToLocaleString: Record<ContentFilterCategory, string> = {
44
ADULT: '성인물',

apps/penxle.com/src/lib/emoji/Emoji.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts">
22
import IconX from '~icons/tabler/x';
3-
import { graphql } from '$glitch';
3+
import { graphql } from '$bifrost';
44
import { mixpanel } from '$lib/analytics';
55
import { Icon } from '$lib/components';
66
import { cx } from '$styled-system/css';

apps/penxle.com/src/lib/emoji/EmojiPicker.svelte

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { onMount } from 'svelte';
44
import IconMoodPlus from '~icons/tabler/mood-plus';
55
import { afterNavigate } from '$app/navigation';
6-
import { fragment, graphql } from '$glitch';
6+
import { fragment, graphql } from '$bifrost';
77
import { mixpanel } from '$lib/analytics';
88
import { Icon } from '$lib/components';
99
import { createFloatingActions } from '$lib/svelte/actions';
@@ -12,7 +12,7 @@
1212
import i18n from './i18n.json';
1313
import { emojiData as data } from './index';
1414
import type { Emoji } from '@emoji-mart/data';
15-
import type { EmojiPicker_query } from '$glitch';
15+
import type { EmojiPicker_query } from '$bifrost';
1616
import type { SystemStyleObject } from '$styled-system/types';
1717
1818
// eslint-disable-next-line @typescript-eslint/no-explicit-any

0 commit comments

Comments
 (0)