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

Fix/graphql #181

Merged
merged 8 commits into from
Jan 9, 2025
Merged
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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ body:
validations:
required: true

projects: ["torin-asakura/6"]
projects: ['torin-asakura/6']
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ body:
validations:
required: true

projects: ["torin-asakura/6"]
projects: ['torin-asakura/6']
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ body:
validations:
required: true

projects: ["torin-asakura/6"]
projects: ['torin-asakura/6']
2 changes: 1 addition & 1 deletion blog/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"main": "src/index.ts",
"scripts": {
"build": "yarn next build src --no-lint && rm ./src/.next/standalone/package.json ; cp -r ./src/.next/standalone ./dist && cp -r ./src/.next/static ./dist/src/.next/static && mv ./dist/src/server.js ./dist/src/index.cjs",
Nelfimov marked this conversation as resolved.
Show resolved Hide resolved
"build": "yarn next build src --no-lint ; cp -r ./src/.next/standalone ./dist && cp -r ./src/.next/static ./dist/src/.next/static && mv ./dist/src/server.js ./dist/src/index.cjs",
"cleanup": "rm -rf dist",
"dev": "yarn next dev src",
"prepack": "run build",
Expand Down
2 changes: 1 addition & 1 deletion blog/app/src/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
13 changes: 7 additions & 6 deletions globals/data/src/apollo/apollo-server.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@

'use server'

import { HttpLink } from '@apollo/client'
import { ApolloClient } from '@apollo/experimental-nextjs-app-support'
import { InMemoryCache } from '@apollo/experimental-nextjs-app-support'
import { from } from '@apollo/client'
import { defaultDataIdFromObject } from '@apollo/client'
import { registerApolloClient } from '@apollo/experimental-nextjs-app-support'

import { GRAPHQL_API_URL } from './apollo.constants.js'
import { getApolloErrorLink } from '../getters/index.js'
import { getApolloHttpLink } from '../getters/index.js'

const errorLink = getApolloErrorLink()
const httpLink = getApolloHttpLink()

const { getClient, PreloadQuery } = registerApolloClient(
() =>
Expand Down Expand Up @@ -39,10 +43,7 @@ const { getClient, PreloadQuery } = registerApolloClient(
}),
connectToDevTools: true,
// @ts-ignore
link: new HttpLink({
uri: GRAPHQL_API_URL,
credentials: 'include',
}),
link: from([errorLink, httpLink]),
})
)

Expand Down
31 changes: 31 additions & 0 deletions globals/data/src/getters/apollo-error-link.getter.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import type { ApolloLink } from '@apollo/client'
import type { ErrorResponse } from '@apollo/client/link/error'

import { onError } from '@apollo/client/link/error'

export const getApolloErrorLink = (): ApolloLink => {
const errorLink = onError((errorResponse) => {
const extendedErrorResponse = errorResponse as unknown as ErrorResponse & {
cause?: Record<string, any>
}
const { graphQLErrors, cause } = extendedErrorResponse

if (graphQLErrors) {
graphQLErrors.forEach(({ message, locations, path, extensions }) => {
console.debug(`[GraphQL error]: Message: ${message}`)
console.debug(`Location: ${locations}`)
console.debug(`Path: ${path}`)
console.debug(`Extenstions: ${extensions}`)
})
}
if (cause) {
const { message, extensions, locations, path } = cause
console.debug(`Cause: ${message}`)
console.debug(`Extenstions: ${extensions}`)
console.debug(`Locatoins: ${locations}`)
console.debug(`Path: ${path}`)
}
})

return errorLink
}
12 changes: 12 additions & 0 deletions globals/data/src/getters/http-link.getter.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { HttpLink } from '@apollo/client'

import { GRAPHQL_API_URL } from '../apollo/apollo.constants.js'

export const getApolloHttpLink = () => {
const httpLink = new HttpLink({
uri: GRAPHQL_API_URL,
credentials: 'include',
})

return httpLink
}
2 changes: 2 additions & 0 deletions globals/data/src/getters/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
export * from './get-seo-metadata.getter.js'
export * from './aqsi-data-getter/index.js'
export * from './apollo-error-link.getter.js'
export * from './http-link.getter.js'
2 changes: 1 addition & 1 deletion ui/icons/src/ArrowDown.icon.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { IconProps } from '../icons.interfaces.js'

import React from 'react'
import { clsx } from 'clsx'
import { memo } from 'react'
import React from 'react'

import { iconSprinkles } from '../icon.css.js'

Expand All @@ -16,8 +16,8 @@
fill='none'
viewBox='0 0 20 20'
className={clsx(className, otherProps?.className)}
style={Object.assign({}, style, otherProps.style)}

Check failure on line 19 in ui/icons/src/ArrowDown.icon.tsx

View workflow job for this annotation

GitHub Actions / Lint

(@typescript-eslint/no-unsafe-argument): Unsafe argument of type `any` assigned to a parameter of type `ClassValue`.

Unsafe argument of type `any` assigned to a parameter of type `ClassValue`.
Raw output
  16 |       fill='none'
  17 |       viewBox='0 0 20 20'
> 18 |       className={clsx(className, otherProps?.className)}
     |                                  ^
  19 |       style={Object.assign({}, style, otherProps.style)}
  20 |       {...props}
  21 |     >
{...props}

Check failure on line 20 in ui/icons/src/ArrowDown.icon.tsx

View workflow job for this annotation

GitHub Actions / Lint

(prefer-object-spread): Use an object spread instead of `Object.assign` eg: `{ ...foo }`.

Use an object spread instead of `Object.assign` eg: `{ ...foo }`.
Raw output
  17 |       viewBox='0 0 20 20'
  18 |       className={clsx(className, otherProps?.className)}
> 19 |       style={Object.assign({}, style, otherProps.style)}
     |              ^
  20 |       {...props}
  21 |     >
  22 |       <path
>
<path
fill='#fff'
Expand Down
2 changes: 1 addition & 1 deletion ui/icons/src/ArrowLeft.icon.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { IconProps } from '../icons.interfaces.js'

import React from 'react'
import { clsx } from 'clsx'
import { memo } from 'react'
import React from 'react'

import { iconSprinkles } from '../icon.css.js'

Expand All @@ -16,8 +16,8 @@
fill='none'
viewBox='0 0 8 14'
className={clsx(className, otherProps?.className)}
style={Object.assign({}, style, otherProps.style)}

Check failure on line 19 in ui/icons/src/ArrowLeft.icon.tsx

View workflow job for this annotation

GitHub Actions / Lint

(@typescript-eslint/no-unsafe-argument): Unsafe argument of type `any` assigned to a parameter of type `ClassValue`.

Unsafe argument of type `any` assigned to a parameter of type `ClassValue`.
Raw output
  16 |       fill='none'
  17 |       viewBox='0 0 8 14'
> 18 |       className={clsx(className, otherProps?.className)}
     |                                  ^
  19 |       style={Object.assign({}, style, otherProps.style)}
  20 |       {...props}
  21 |     >
{...props}

Check failure on line 20 in ui/icons/src/ArrowLeft.icon.tsx

View workflow job for this annotation

GitHub Actions / Lint

(prefer-object-spread): Use an object spread instead of `Object.assign` eg: `{ ...foo }`.

Use an object spread instead of `Object.assign` eg: `{ ...foo }`.
Raw output
  17 |       viewBox='0 0 8 14'
  18 |       className={clsx(className, otherProps?.className)}
> 19 |       style={Object.assign({}, style, otherProps.style)}
     |              ^
  20 |       {...props}
  21 |     >
  22 |       <path
>
<path
fill='#7B838A'
Expand Down
2 changes: 1 addition & 1 deletion ui/icons/src/ArrowRight.icon.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { IconProps } from '../icons.interfaces.js'

import React from 'react'
import { clsx } from 'clsx'
import { memo } from 'react'
import React from 'react'

import { iconSprinkles } from '../icon.css.js'

Expand All @@ -16,8 +16,8 @@
fill='none'
viewBox='0 0 8 14'
className={clsx(className, otherProps?.className)}
style={Object.assign({}, style, otherProps.style)}

Check failure on line 19 in ui/icons/src/ArrowRight.icon.tsx

View workflow job for this annotation

GitHub Actions / Lint

(@typescript-eslint/no-unsafe-argument): Unsafe argument of type `any` assigned to a parameter of type `ClassValue`.

Unsafe argument of type `any` assigned to a parameter of type `ClassValue`.
Raw output
  16 |       fill='none'
  17 |       viewBox='0 0 8 14'
> 18 |       className={clsx(className, otherProps?.className)}
     |                                  ^
  19 |       style={Object.assign({}, style, otherProps.style)}
  20 |       {...props}
  21 |     >
{...props}

Check failure on line 20 in ui/icons/src/ArrowRight.icon.tsx

View workflow job for this annotation

GitHub Actions / Lint

(prefer-object-spread): Use an object spread instead of `Object.assign` eg: `{ ...foo }`.

Use an object spread instead of `Object.assign` eg: `{ ...foo }`.
Raw output
  17 |       viewBox='0 0 8 14'
  18 |       className={clsx(className, otherProps?.className)}
> 19 |       style={Object.assign({}, style, otherProps.style)}
     |              ^
  20 |       {...props}
  21 |     >
  22 |       <path
>
<path
fill='#7B838A'
Expand Down
2 changes: 1 addition & 1 deletion ui/icons/src/Back.icon.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { IconProps } from '../icons.interfaces.js'

import React from 'react'
import { clsx } from 'clsx'
import { memo } from 'react'
import React from 'react'

import { vars } from '@ui/theme'

Expand All @@ -18,8 +18,8 @@
fill='none'
viewBox='0 0 12 24'
className={clsx(className, otherProps?.className)}
style={Object.assign({}, style, otherProps.style)}

Check failure on line 21 in ui/icons/src/Back.icon.tsx

View workflow job for this annotation

GitHub Actions / Lint

(@typescript-eslint/no-unsafe-argument): Unsafe argument of type `any` assigned to a parameter of type `ClassValue`.

Unsafe argument of type `any` assigned to a parameter of type `ClassValue`.
Raw output
  18 |       fill='none'
  19 |       viewBox='0 0 12 24'
> 20 |       className={clsx(className, otherProps?.className)}
     |                                  ^
  21 |       style={Object.assign({}, style, otherProps.style)}
  22 |       {...props}
  23 |     >
{...props}

Check failure on line 22 in ui/icons/src/Back.icon.tsx

View workflow job for this annotation

GitHub Actions / Lint

(prefer-object-spread): Use an object spread instead of `Object.assign` eg: `{ ...foo }`.

Use an object spread instead of `Object.assign` eg: `{ ...foo }`.
Raw output
  19 |       viewBox='0 0 12 24'
  20 |       className={clsx(className, otherProps?.className)}
> 21 |       style={Object.assign({}, style, otherProps.style)}
     |              ^
  22 |       {...props}
  23 |     >
  24 |       <path
>
<path
fill={vars.colors[color as keyof typeof vars.colors] || color || '#252C32'}
Expand Down
2 changes: 1 addition & 1 deletion ui/icons/src/Check.icon.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { IconProps } from '../icons.interfaces.js'

import React from 'react'
import { clsx } from 'clsx'
import { memo } from 'react'
import React from 'react'

import { iconSprinkles } from '../icon.css.js'

Expand All @@ -16,8 +16,8 @@
fill='none'
viewBox='0 0 24 24'
className={clsx(className, otherProps?.className)}
style={Object.assign({}, style, otherProps.style)}

Check failure on line 19 in ui/icons/src/Check.icon.tsx

View workflow job for this annotation

GitHub Actions / Lint

(@typescript-eslint/no-unsafe-argument): Unsafe argument of type `any` assigned to a parameter of type `ClassValue`.

Unsafe argument of type `any` assigned to a parameter of type `ClassValue`.
Raw output
  16 |       fill='none'
  17 |       viewBox='0 0 24 24'
> 18 |       className={clsx(className, otherProps?.className)}
     |                                  ^
  19 |       style={Object.assign({}, style, otherProps.style)}
  20 |       {...props}
  21 |     >
{...props}

Check failure on line 20 in ui/icons/src/Check.icon.tsx

View workflow job for this annotation

GitHub Actions / Lint

(prefer-object-spread): Use an object spread instead of `Object.assign` eg: `{ ...foo }`.

Use an object spread instead of `Object.assign` eg: `{ ...foo }`.
Raw output
  17 |       viewBox='0 0 24 24'
  18 |       className={clsx(className, otherProps?.className)}
> 19 |       style={Object.assign({}, style, otherProps.style)}
     |              ^
  20 |       {...props}
  21 |     >
  22 |       <path
>
<path
fill='#fff'
Expand Down
2 changes: 1 addition & 1 deletion ui/icons/src/Close.icon.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { IconProps } from '../icons.interfaces.js'

import React from 'react'
import { clsx } from 'clsx'
import { memo } from 'react'
import React from 'react'

import { vars } from '@ui/theme'

Expand All @@ -18,8 +18,8 @@
fill='none'
viewBox='0 0 25 24'
className={clsx(className, otherProps?.className)}
style={Object.assign({}, style, otherProps.style)}

Check failure on line 21 in ui/icons/src/Close.icon.tsx

View workflow job for this annotation

GitHub Actions / Lint

(@typescript-eslint/no-unsafe-argument): Unsafe argument of type `any` assigned to a parameter of type `ClassValue`.

Unsafe argument of type `any` assigned to a parameter of type `ClassValue`.
Raw output
  18 |       fill='none'
  19 |       viewBox='0 0 25 24'
> 20 |       className={clsx(className, otherProps?.className)}
     |                                  ^
  21 |       style={Object.assign({}, style, otherProps.style)}
  22 |       {...props}
  23 |     >
{...props}

Check failure on line 22 in ui/icons/src/Close.icon.tsx

View workflow job for this annotation

GitHub Actions / Lint

(prefer-object-spread): Use an object spread instead of `Object.assign` eg: `{ ...foo }`.

Use an object spread instead of `Object.assign` eg: `{ ...foo }`.
Raw output
  19 |       viewBox='0 0 25 24'
  20 |       className={clsx(className, otherProps?.className)}
> 21 |       style={Object.assign({}, style, otherProps.style)}
     |              ^
  22 |       {...props}
  23 |     >
  24 |       <path
>
<path
fill={vars.colors[color as keyof typeof vars.colors] || color || '#252C32'}
Expand Down
2 changes: 1 addition & 1 deletion ui/icons/src/DoubleArrow.icon.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { IconProps } from '../icons.interfaces.js'

import React from 'react'
import { clsx } from 'clsx'
import { memo } from 'react'
import React from 'react'

import { iconSprinkles } from '../icon.css.js'

Expand All @@ -16,8 +16,8 @@
fill='none'
viewBox='0 0 24 24'
className={clsx(className, otherProps?.className)}
style={Object.assign({}, style, otherProps.style)}

Check failure on line 19 in ui/icons/src/DoubleArrow.icon.tsx

View workflow job for this annotation

GitHub Actions / Lint

(@typescript-eslint/no-unsafe-argument): Unsafe argument of type `any` assigned to a parameter of type `ClassValue`.

Unsafe argument of type `any` assigned to a parameter of type `ClassValue`.
Raw output
  16 |       fill='none'
  17 |       viewBox='0 0 24 24'
> 18 |       className={clsx(className, otherProps?.className)}
     |                                  ^
  19 |       style={Object.assign({}, style, otherProps.style)}
  20 |       {...props}
  21 |     >
{...props}

Check failure on line 20 in ui/icons/src/DoubleArrow.icon.tsx

View workflow job for this annotation

GitHub Actions / Lint

(prefer-object-spread): Use an object spread instead of `Object.assign` eg: `{ ...foo }`.

Use an object spread instead of `Object.assign` eg: `{ ...foo }`.
Raw output
  17 |       viewBox='0 0 24 24'
  18 |       className={clsx(className, otherProps?.className)}
> 19 |       style={Object.assign({}, style, otherProps.style)}
     |              ^
  20 |       {...props}
  21 |     >
  22 |       <path
>
<path
fill='#252C32'
Expand Down
2 changes: 1 addition & 1 deletion ui/icons/src/DropDown.icon.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { IconProps } from '../icons.interfaces.js'

import React from 'react'
import { clsx } from 'clsx'
import { memo } from 'react'
import React from 'react'

import { iconSprinkles } from '../icon.css.js'

Expand All @@ -16,8 +16,8 @@
fill='none'
viewBox='0 0 14 8'
className={clsx(className, otherProps?.className)}
style={Object.assign({}, style, otherProps.style)}

Check failure on line 19 in ui/icons/src/DropDown.icon.tsx

View workflow job for this annotation

GitHub Actions / Lint

(@typescript-eslint/no-unsafe-argument): Unsafe argument of type `any` assigned to a parameter of type `ClassValue`.

Unsafe argument of type `any` assigned to a parameter of type `ClassValue`.
Raw output
  16 |       fill='none'
  17 |       viewBox='0 0 14 8'
> 18 |       className={clsx(className, otherProps?.className)}
     |                                  ^
  19 |       style={Object.assign({}, style, otherProps.style)}
  20 |       {...props}
  21 |     >
{...props}

Check failure on line 20 in ui/icons/src/DropDown.icon.tsx

View workflow job for this annotation

GitHub Actions / Lint

(prefer-object-spread): Use an object spread instead of `Object.assign` eg: `{ ...foo }`.

Use an object spread instead of `Object.assign` eg: `{ ...foo }`.
Raw output
  17 |       viewBox='0 0 14 8'
  18 |       className={clsx(className, otherProps?.className)}
> 19 |       style={Object.assign({}, style, otherProps.style)}
     |              ^
  20 |       {...props}
  21 |     >
  22 |       <path
>
<path
stroke='#252C32'
Expand Down
2 changes: 1 addition & 1 deletion ui/icons/src/Facebook.icon.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { IconProps } from '../icons.interfaces.js'

import React from 'react'
import { clsx } from 'clsx'
import { memo } from 'react'
import React from 'react'

import { vars } from '@ui/theme'

Expand Down
2 changes: 1 addition & 1 deletion ui/icons/src/FooterLogo.icon.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { IconProps } from '../icons.interfaces.js'

import React from 'react'
import { clsx } from 'clsx'
import { memo } from 'react'
import React from 'react'

import { iconSprinkles } from '../icon.css.js'

Expand Down
2 changes: 1 addition & 1 deletion ui/icons/src/Logo.icon.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { IconProps } from '../icons.interfaces.js'

import React from 'react'
import { clsx } from 'clsx'
import { memo } from 'react'
import React from 'react'

import { vars } from '@ui/theme'

Expand Down
2 changes: 1 addition & 1 deletion ui/icons/src/Menu.icon.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { IconProps } from '../icons.interfaces.js'

import React from 'react'
import { clsx } from 'clsx'
import { memo } from 'react'
import React from 'react'

import { vars } from '@ui/theme'

Expand Down
2 changes: 1 addition & 1 deletion ui/icons/src/Telegram.icon.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { IconProps } from '../icons.interfaces.js'

import React from 'react'
import { clsx } from 'clsx'
import { memo } from 'react'
import React from 'react'

import { vars } from '@ui/theme'

Expand Down
2 changes: 1 addition & 1 deletion ui/icons/src/Vk.icon.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { IconProps } from '../icons.interfaces.js'

import React from 'react'
import { clsx } from 'clsx'
import { memo } from 'react'
import React from 'react'

import { vars } from '@ui/theme'

Expand Down
2 changes: 1 addition & 1 deletion ui/icons/src/Wheel.icon.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { IconProps } from '../icons.interfaces.js'

import React from 'react'
import { clsx } from 'clsx'
import { memo } from 'react'
import React from 'react'

import { vars } from '@ui/theme'

Expand Down
Loading