Skip to content

Commit

Permalink
chore(deps-minor) Update Apollo GraphQL packages
Browse files Browse the repository at this point in the history
  • Loading branch information
renovate[bot] authored and ansmonjol committed Aug 19, 2024
1 parent 1b18597 commit 57d6aac
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 29 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"webpack-merge": "5.9.0"
},
"dependencies": {
"@apollo/client": "3.8.1",
"@apollo/client": "3.11.4",
"@mui/material": "5.14.18",
"@mui/styled-engine": "5.14.18",
"@mui/styled-engine-sc": "5.14.12",
Expand All @@ -103,7 +103,7 @@
"@sentry/tracing": "7.114.0",
"apollo-link-timeout": "4.0.0",
"apollo-upload-client": "17.0.0",
"apollo3-cache-persist": "0.14.1",
"apollo3-cache-persist": "0.15.0",
"classnames": "2.3.2",
"formik": "2.4.5",
"graphql": "^16.6.0",
Expand Down
4 changes: 2 additions & 2 deletions src/components/settings/integrations/AddNetsuiteDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { gql } from '@apollo/client'
import { Stack } from '@mui/material'
import Nango from '@nangohq/frontend'
import { useFormik } from 'formik'
import { GraphQLError } from 'graphql'
import { GraphQLFormattedError } from 'graphql'
import { forwardRef, RefObject, useId, useImperativeHandle, useRef, useState } from 'react'
import { useNavigate } from 'react-router'
import { generatePath } from 'react-router-dom'
Expand Down Expand Up @@ -140,7 +140,7 @@ export const AddNetsuiteDialog = forwardRef<AddNetsuiteDialogRef>((_, ref) => {
onSubmit: async ({ ...values }, formikBag) => {
setShowGlobalError(false)

const handleError = (errors: readonly GraphQLError[]) => {
const handleError = (errors: readonly GraphQLFormattedError[]) => {
if (hasDefinedGQLError('ValueAlreadyExist', errors)) {
formikBag.setErrors({
code: translate('text_632a2d437e341dcc76817556'),
Expand Down
4 changes: 2 additions & 2 deletions src/components/settings/integrations/AddXeroDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { gql } from '@apollo/client'
import { Stack } from '@mui/material'
import Nango from '@nangohq/frontend'
import { useFormik } from 'formik'
import { GraphQLError } from 'graphql'
import { GraphQLFormattedError } from 'graphql'
import { forwardRef, RefObject, useId, useImperativeHandle, useRef, useState } from 'react'
import { useNavigate } from 'react-router'
import { generatePath } from 'react-router-dom'
Expand Down Expand Up @@ -121,7 +121,7 @@ export const AddXeroDialog = forwardRef<AddXeroDialogRef>((_, ref) => {
onSubmit: async ({ ...values }, formikBag) => {
setShowGlobalError(false)

const handleError = (errors: readonly GraphQLError[]) => {
const handleError = (errors: readonly GraphQLFormattedError[]) => {
if (hasDefinedGQLError('ValueAlreadyExist', errors)) {
formikBag.setErrors({
code: translate('text_632a2d437e341dcc76817556'),
Expand Down
8 changes: 4 additions & 4 deletions src/core/apolloClient/__tests__/errorUtils.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ApolloError } from '@apollo/client'
import { GraphQLError } from 'graphql'
import { GraphQLFormattedError } from 'graphql'

import { hasDefinedGQLError, LagoGQLError } from '../errorUtils'

Expand All @@ -24,9 +24,9 @@ const createApolloError: (details: Record<string, string | string[]>) => ApolloE
],
}) as unknown as ApolloError

const createGraphQLError: (details: Record<string, string | string[]>) => GraphQLError[] = (
details,
) =>
const createGraphQLError: (
details: Record<string, string | string[]>,
) => GraphQLFormattedError[] = (details) =>
[
{
message: 'Unprocessable Entity',
Expand Down
6 changes: 3 additions & 3 deletions src/core/apolloClient/errorUtils.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ApolloError } from '@apollo/client'
import { GraphQLError } from 'graphql'
import { GraphQLFormattedError } from 'graphql'

import { LagoApiError } from '~/generated/graphql'

export interface LagoGQLError extends GraphQLError {
export interface LagoGQLError extends GraphQLFormattedError {
extensions: {
code: LagoApiError
details: Record<string, string[]>
Expand All @@ -13,7 +13,7 @@ export interface LagoGQLError extends GraphQLError {
// --------------------- Graphql errors checker ---------------------
export const hasDefinedGQLError = (
errorCode: keyof typeof LagoApiError,
errorObject?: ApolloError | readonly GraphQLError[],
errorObject?: ApolloError | readonly GraphQLFormattedError[],
key?: string,
) => {
if (!errorObject) return false
Expand Down
53 changes: 37 additions & 16 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,20 @@
"@jridgewell/gen-mapping" "^0.1.0"
"@jridgewell/trace-mapping" "^0.3.9"

"@apollo/client@3.8.1", "@apollo/client@^3.7.0":
version "3.8.1"
resolved "https://registry.yarnpkg.com/@apollo/client/-/client-3.8.1.tgz#a1e3045a5fb276c08e38f7b5f930551d79741257"
integrity sha512-JGGj/9bdoLEqzatRikDeN8etseY5qeFAY0vSAx/Pd0ePNsaflKzHx6V2NZ0NsGkInq+9IXXX3RLVDf0EotizMA==
"@apollo/client@3.11.4", "@apollo/client@^3.7.0":
version "3.11.4"
resolved "https://registry.yarnpkg.com/@apollo/client/-/client-3.11.4.tgz#8b0fed2d091d47597e8ddafca85776bf612ae3aa"
integrity sha512-bmgYKkULpym8wt8aXlAZ1heaYo0skLJ5ru0qJ+JCRoo03Pe+yIDbBCnqlDw6Mjj76hFkDw3HwFMgZC2Hxp30Mg==
dependencies:
"@graphql-typed-document-node/core" "^3.1.1"
"@wry/context" "^0.7.3"
"@wry/caches" "^1.0.0"
"@wry/equality" "^0.5.6"
"@wry/trie" "^0.4.3"
"@wry/trie" "^0.5.0"
graphql-tag "^2.12.6"
hoist-non-react-statics "^3.3.2"
optimism "^0.17.5"
optimism "^0.18.0"
prop-types "^15.7.2"
rehackt "^0.1.0"
response-iterator "^0.2.6"
symbol-observable "^4.0.0"
ts-invariant "^0.10.3"
Expand Down Expand Up @@ -3567,7 +3568,14 @@
fast-url-parser "^1.1.3"
tslib "^2.3.1"

"@wry/context@^0.7.0", "@wry/context@^0.7.3":
"@wry/caches@^1.0.0":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@wry/caches/-/caches-1.0.1.tgz#8641fd3b6e09230b86ce8b93558d44cf1ece7e52"
integrity sha512-bXuaUNLVVkD20wcGBWRyo7j9N3TxePEWFZj2Y+r9OoUzfqmavM84+mFykRicNsBqatba5JLay1t48wxaXaWnlA==
dependencies:
tslib "^2.3.0"

"@wry/context@^0.7.0":
version "0.7.3"
resolved "https://registry.yarnpkg.com/@wry/context/-/context-0.7.3.tgz#240f6dfd4db5ef54f81f6597f6714e58d4f476a1"
integrity sha512-Nl8WTesHp89RF803Se9X3IiHjdmLBrIvPMaJkl+rKVJAYyPsz1TEUbu89943HpvujtSJgDUx9W4vZw3K1Mr3sA==
Expand All @@ -3588,6 +3596,13 @@
dependencies:
tslib "^2.3.0"

"@wry/trie@^0.5.0":
version "0.5.0"
resolved "https://registry.yarnpkg.com/@wry/trie/-/trie-0.5.0.tgz#11e783f3a53f6e4cd1d42d2d1323f5bc3fa99c94"
integrity sha512-FNoYzHawTMk/6KMQoEG5O4PuioX19UbwdQKF44yw0nLfOypfQdjtfZzo/UIJWAJ23sNIFbD1Ug9lbaDGMwbqQA==
dependencies:
tslib "^2.3.0"

"@xtuc/ieee754@^1.2.0":
version "1.2.0"
resolved "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz"
Expand Down Expand Up @@ -3786,10 +3801,10 @@ apollo-upload-client@17.0.0:
dependencies:
extract-files "^11.0.0"

apollo3-cache-persist@0.14.1:
version "0.14.1"
resolved "https://registry.npmjs.org/apollo3-cache-persist/-/apollo3-cache-persist-0.14.1.tgz"
integrity sha512-p/jNzN/MmSd0TmY7/ts0B3qi0SdQ3w9yNLQdKqB3GGb9xATUlAum2v4hSrTeWd/DZKK2Z7Xg5kFXTH6nNVnKSQ==
apollo3-cache-persist@0.15.0:
version "0.15.0"
resolved "https://registry.yarnpkg.com/apollo3-cache-persist/-/apollo3-cache-persist-0.15.0.tgz#aee23062bc811f3bc15369b850002f54195a6572"
integrity sha512-asxhPOHGddgXYvY4/Wa+XLODYpjci/kPB4zdy82D0tVGzVmvO4lqp3k06NtzHvd//gd9kCnTaG8iziwAcXZYjw==

arch@^2.2.0:
version "2.2.0"
Expand Down Expand Up @@ -8574,11 +8589,12 @@ opener@^1.5.2:
resolved "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz"
integrity sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==

optimism@^0.17.5:
version "0.17.5"
resolved "https://registry.yarnpkg.com/optimism/-/optimism-0.17.5.tgz#a4c78b3ad12c58623abedbebb4f2f2c19b8e8816"
integrity sha512-TEcp8ZwK1RczmvMnvktxHSF2tKgMWjJ71xEFGX5ApLh67VsMSTy1ZUlipJw8W+KaqgOmQ+4pqwkeivY89j+4Vw==
optimism@^0.18.0:
version "0.18.0"
resolved "https://registry.yarnpkg.com/optimism/-/optimism-0.18.0.tgz#e7bb38b24715f3fdad8a9a7fc18e999144bbfa63"
integrity sha512-tGn8+REwLRNFnb9WmcY5IfpOqeX2kpaYJ1s6Ae3mn12AeydLkR3j+jSCmVQFoXqU8D41PAJ1RG1rCRNWmNZVmQ==
dependencies:
"@wry/caches" "^1.0.0"
"@wry/context" "^0.7.0"
"@wry/trie" "^0.4.3"
tslib "^2.3.0"
Expand Down Expand Up @@ -9352,6 +9368,11 @@ regjsparser@^0.9.1:
dependencies:
jsesc "~0.5.0"

rehackt@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/rehackt/-/rehackt-0.1.0.tgz#a7c5e289c87345f70da8728a7eb878e5d03c696b"
integrity sha512-7kRDOuLHB87D/JESKxQoRwv4DzbIdwkAGQ7p6QKGdVlY1IZheUnVhlk/4UZlNUVxdAXpyxikE3URsG067ybVzw==

relateurl@^0.2.7:
version "0.2.7"
resolved "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz"
Expand Down

0 comments on commit 57d6aac

Please sign in to comment.