Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

신규 graphql 클라이언트 구현 #1688

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

node_modules/

.bifrost/
.glitch/
.svelte-kit/
.turbo/
Expand Down
8 changes: 4 additions & 4 deletions apps/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"scripts": {
"build": "vite build",
"codegen": "svelte-kit sync && panda codegen && glitch generate",
"codegen": "svelte-kit sync && panda codegen && bifrost codegen",
"dev": "doppler run -- vite dev",
"lint:svelte": "svelte-check --fail-on-warnings",
"lint:typecheck": "tsc",
Expand Down Expand Up @@ -47,11 +47,11 @@
"@tiptap/html": "^2.3.0",
"@tiptap/pm": "^2.3.0",
"@types/sortablejs": "^1.15.8",
"@urql/core": "^5.0.2",
"@urql/exchange-graphcache": "^6.5.1",
"@urql/core": "^5.0.3",
"@urql/exchange-graphcache": "^7.0.2",
"@use-gesture/vanilla": "^10.3.1",
"@withglyph/adapter-docker": "workspace:^",
"@withglyph/glitch": "workspace:^",
"@withglyph/bifrost": "workspace:^",
"@withglyph/lib": "workspace:^",
"argon2": "^0.40.1",
"async-mutex": "^0.5.0",
Expand Down
13 changes: 13 additions & 0 deletions apps/website/src/hooks/handles/headers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import type { Handle } from '@sveltejs/kit';

export const headers = (async ({ event, resolve }) => {
return await resolve(event, {
filterSerializedResponseHeaders: (name) => {
if (name === 'content-type') {
return true;
}

return false;
},
});
}) satisfies Handle;
1 change: 1 addition & 0 deletions apps/website/src/hooks/handles/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from './headers';
export * from './logging';
export * from './maintenance';
4 changes: 2 additions & 2 deletions apps/website/src/hooks/server.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { sequence } from '@sveltejs/kit/hooks';
import { building } from '$app/environment';
import { setupGlobals } from './common';
import { logging } from './handles';
import { headers, logging } from './handles';

export { handleError } from './common';

setupGlobals();

export const handle = sequence(logging);
export const handle = sequence(logging, headers);

if (!building) {
await import('$lib/server/graphql/handler');
Expand Down
4 changes: 2 additions & 2 deletions apps/website/src/lib/components/Avatar.svelte
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script lang="ts">
import { fragment, graphql } from '$glitch';
import { fragment, graphql } from '$bifrost';
import { css } from '$styled-system/css';
import Image from './Image.svelte';
import type { Avatar_profile } from '$glitch';
import type { Avatar_profile } from '$bifrost';
import type { SystemStyleObject } from '$styled-system/types';

type Size = 16 | 24 | 32 | 48 | 64 | 96 | 128 | 256 | 512 | 1024 | 'full';
Expand Down
2 changes: 1 addition & 1 deletion apps/website/src/lib/components/GridImage.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { Image } from '$lib/components';
import { css, sva } from '$styled-system/css';
import type { Image_image } from '$glitch';
import type { Image_image } from '$bifrost';
import type { SystemStyleObject } from '$styled-system/types';

export let style: SystemStyleObject | undefined = undefined;
Expand Down
4 changes: 2 additions & 2 deletions apps/website/src/lib/components/Image.svelte
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script lang="ts">
import qs from 'query-string';
import CompactLogo from '$assets/logos/compact.svg?component';
import { fragment, graphql } from '$glitch';
import { fragment, graphql } from '$bifrost';
import { css } from '$styled-system/css';
import type { Image_image } from '$glitch';
import type { Image_image } from '$bifrost';
import type { SystemStyleObject } from '$styled-system/types';

type Size = 16 | 24 | 32 | 48 | 64 | 96 | 128 | 256 | 512 | 1024 | 'full';
Expand Down
4 changes: 2 additions & 2 deletions apps/website/src/lib/components/PostCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
import IconBookmark from '~icons/tabler/bookmark';
import IconBookmarkFilled from '~icons/tabler/bookmark-filled';
import IconDotsVertical from '~icons/tabler/dots-vertical';
import { fragment, graphql } from '$glitch';
import { fragment, graphql } from '$bifrost';
import { mixpanel } from '$lib/analytics';
import { Avatar, Chip, Icon, Image, Tag } from '$lib/components';
import { css } from '$styled-system/css';
import { center, flex } from '$styled-system/patterns';
import type { Feed_post } from '$glitch';
import type { Feed_post } from '$bifrost';
import type { SystemStyleObject } from '$styled-system/types';

let _post: Feed_post;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import ky from 'ky';
import { createEventDispatcher } from 'svelte';
import { graphql } from '$glitch';
import { graphql } from '$bifrost';
import { Button, Modal } from '$lib/components/v2';
import { trackable } from '$lib/svelte/store';
import { isValidImageFile, validImageMimes } from '$lib/utils';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import mixpanel from 'mixpanel-browser';
import IconCamera from '~icons/tabler/camera';
import { graphql } from '$glitch';
import { graphql } from '$bifrost';
import { Icon, Image } from '$lib/components';
import { ThumbnailPicker } from '$lib/components/media';
import { Button, Modal } from '$lib/components/v2';
Expand All @@ -10,7 +10,7 @@
import { UpdateSpaceCollectionSchema } from '$lib/validations';
import { css } from '$styled-system/css';
import { center } from '$styled-system/patterns';
import type { Image_image } from '$glitch';
import type { Image_image } from '$bifrost';

let thumbnailPicker: ThumbnailPicker;
export let open = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import IconLayoutGrid from '~icons/tabler/layout-grid';
import IconMinus from '~icons/tabler/minus';
import IconPlus from '~icons/tabler/plus';
import { fragment, graphql } from '$glitch';
import { fragment, graphql } from '$bifrost';
import { Icon, Tooltip } from '$lib/components';
import Image from '$lib/components/Image.svelte';
import { Button, Modal } from '$lib/components/v2';
Expand All @@ -22,7 +22,7 @@
import type {
SpaceCollectionsEntityPage_ManageCollectionModal_collection,
SpaceCollectionsEntityPage_ManageCollectionModal_post,
} from '$glitch';
} from '$bifrost';

let _collection: SpaceCollectionsEntityPage_ManageCollectionModal_collection;
let _posts: SpaceCollectionsEntityPage_ManageCollectionModal_post[];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import mixpanel from 'mixpanel-browser';
import IconCamera from '~icons/tabler/camera';
import { fragment, graphql } from '$glitch';
import { fragment, graphql } from '$bifrost';
import { Alert, Icon, Image } from '$lib/components';
import { ThumbnailPicker } from '$lib/components/media';
import { Button, Modal } from '$lib/components/v2';
Expand All @@ -10,7 +10,7 @@
import { UpdateSpaceCollectionSchema } from '$lib/validations';
import { css } from '$styled-system/css';
import { center } from '$styled-system/patterns';
import type { UpdateCollectionModal_Collection_query } from '$glitch';
import type { UpdateCollectionModal_Collection_query } from '$bifrost';

let thumbnailPicker: ThumbnailPicker;
export let open = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import IconChevronDown from '~icons/tabler/chevron-down';
import IconPlus from '~icons/tabler/plus';
import IconTrash from '~icons/tabler/trash';
import { fragment, graphql } from '$glitch';
import { fragment, graphql } from '$bifrost';
import { mixpanel } from '$lib/analytics';
import { Avatar, Button, Chip, Icon, Image, Modal, Tag, Tooltip } from '$lib/components';
import { Checkbox, Editable, Switch } from '$lib/components/forms';
Expand All @@ -16,12 +16,8 @@
import { css } from '$styled-system/css';
import { flex } from '$styled-system/patterns';
import type { ChangeEventHandler } from 'svelte/elements';
import type {
PostManageTable_Collection,
PostManageTable_Post_query,
PostManageTable_SpaceMember,
PostVisibility,
} from '$glitch';
import type { PostManageTable_Collection, PostManageTable_Post_query, PostManageTable_SpaceMember } from '$bifrost';
import type { PostVisibility } from '$lib/enums';
import type { PublishPostInput } from '$lib/validations/post';

const toolbarMenuOffset = 16;
Expand Down
2 changes: 1 addition & 1 deletion apps/website/src/lib/const/feed.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ContentFilterCategory, PostCategory, PostPair } from '$glitch';
import type { ContentFilterCategory, PostCategory, PostPair } from '$lib/enums';

export const filterToLocaleString: Record<ContentFilterCategory, string> = {
ADULT: '성인물',
Expand Down
2 changes: 1 addition & 1 deletion apps/website/src/lib/const/revenue.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { RevenueWithdrawalState } from '$glitch';
import type { RevenueWithdrawalState } from '$lib/enums';

export const banks: Record<string, string> = {
'090': '카카오뱅크',
Expand Down
2 changes: 1 addition & 1 deletion apps/website/src/lib/emoji/Emoji.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import IconX from '~icons/tabler/x';
import { graphql } from '$glitch';
import { graphql } from '$bifrost';
import { mixpanel } from '$lib/analytics';
import { Icon } from '$lib/components';
import { cx } from '$styled-system/css';
Expand Down
4 changes: 2 additions & 2 deletions apps/website/src/lib/emoji/EmojiPicker.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { onMount } from 'svelte';
import IconMoodPlus from '~icons/tabler/mood-plus';
import { afterNavigate } from '$app/navigation';
import { fragment, graphql } from '$glitch';
import { fragment, graphql } from '$bifrost';
import { mixpanel } from '$lib/analytics';
import { Icon } from '$lib/components';
import { createFloatingActions } from '$lib/svelte/actions';
Expand All @@ -12,7 +12,7 @@
import i18n from './i18n.json';
import { emojiData as data } from './index';
import type { Emoji } from '@emoji-mart/data';
import type { EmojiPicker_query } from '$glitch';
import type { EmojiPicker_query } from '$bifrost';
import type { SystemStyleObject } from '$styled-system/types';

// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand Down
Loading
Loading