Skip to content
This repository has been archived by the owner on Nov 17, 2024. It is now read-only.

Commit

Permalink
fix: revert apollo
Browse files Browse the repository at this point in the history
  • Loading branch information
JClackett committed May 7, 2022
1 parent ac36c23 commit c3e3015
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 25 deletions.
4 changes: 2 additions & 2 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
]
},
"dependencies": {
"@apollo/client": "3.6.2",
"@apollo/client": "3.5.10",
"@react-native-async-storage/async-storage": "~1.17.3",
"@react-navigation/core": "6.2.1",
"@react-navigation/native": "6.0.10",
Expand All @@ -43,7 +43,7 @@
"react-native-safe-area-context": "4.2.4",
"react-native-screens": "~3.11.1",
"react-native-svg": "12.3.0",
"react-native-web": "0.17.7",
"react-native-web": "^0.17.7",
"styled-components": "5.3.5",
"styled-system": "5.1.5"
},
Expand Down
4 changes: 3 additions & 1 deletion packages/app/src/application/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ const authLink = setContext(async (_, { headers }) => {

const retryLink = new RetryLink()

const errorLink = onError(({ graphQLErrors, operation, forward }) => {
const errorLink = onError(({ graphQLErrors, networkError, operation, forward }) => {
console.log(graphQLErrors, networkError)

if (graphQLErrors) {
for (const err of graphQLErrors) {
if (err.message === "Expired token") {
Expand Down
3 changes: 2 additions & 1 deletion packages/app/src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ export const SENTRY_DSN = "https://[email protected]

// export const API_URL = IS_PRODUCTION
// ? "https://boilerplate.graphcdn.app"
// : "http://192.168.0.155:5555/graphql"
// : "http://192.168.68.125:5555/graphql"

export const API_URL = IS_PRODUCTION ? "https://boilerplate.graphcdn.app" : "http://localhost:5555/graphql"
//NOTE: when trying to connect on real device, change the the above localhost to your computers ip address

Expand Down
19 changes: 19 additions & 0 deletions packages/app/src/lib/graphql.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export type LoginInput = {

export type Mutation = {
__typename?: 'Mutation';
createUser: User;
destroyAccount: Scalars['Boolean'];
forgotPassword: Scalars['Boolean'];
getBulkSignedS3UrlForPut?: Maybe<Array<SignedResponse>>;
Expand All @@ -61,6 +62,11 @@ export type Mutation = {
};


export type MutationCreateUserArgs = {
data: UserCreateInput;
};


export type MutationForgotPasswordArgs = {
email: Scalars['String'];
};
Expand Down Expand Up @@ -282,6 +288,19 @@ export type User = {
updatedAt: Scalars['DateTime'];
};

export type UserCreateInput = {
avatar?: InputMaybe<Scalars['String']>;
bio?: InputMaybe<Scalars['String']>;
createdAt?: InputMaybe<Scalars['DateTime']>;
email: Scalars['String'];
firstName: Scalars['String'];
id?: InputMaybe<Scalars['String']>;
lastName: Scalars['String'];
password: Scalars['String'];
role?: InputMaybe<Role>;
updatedAt?: InputMaybe<Scalars['DateTime']>;
};

export type UserOrderByWithRelationInput = {
avatar?: InputMaybe<SortOrder>;
bio?: InputMaybe<SortOrder>;
Expand Down
2 changes: 1 addition & 1 deletion packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"author": "",
"license": "MIT",
"dependencies": {
"@apollo/client": "3.6.2",
"@apollo/client": "3.5.10",
"@chakra-ui/react": "1.8.8",
"@emotion/react": "11.9.0",
"@emotion/styled": "11.8.1",
Expand Down
34 changes: 14 additions & 20 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,22 @@
dependencies:
"@jridgewell/trace-mapping" "^0.3.0"

"@apollo/client@3.6.2":
version "3.6.2"
resolved "https://registry.yarnpkg.com/@apollo/client/-/client-3.6.2.tgz#0418bfa6358dd117894c8af396706cfa2b186032"
integrity sha512-DNWyl+NNU2VsfHtXwOr4rV9hnQFPkl2/dNXeouhk9q7bXCWdEh3K8YTt/frULGVKbQjtnlPmz8C+LFI/JZ2N3w==
"@apollo/client@3.5.10":
version "3.5.10"
resolved "https://registry.yarnpkg.com/@apollo/client/-/client-3.5.10.tgz#43463108a6e07ae602cca0afc420805a19339a71"
integrity sha512-tL3iSpFe9Oldq7gYikZK1dcYxp1c01nlSwtsMz75382HcI6fvQXyFXUCJTTK3wgO2/ckaBvRGw7VqjFREdVoRw==
dependencies:
"@graphql-typed-document-node/core" "^3.1.1"
"@graphql-typed-document-node/core" "^3.0.0"
"@wry/context" "^0.6.0"
"@wry/equality" "^0.5.0"
"@wry/trie" "^0.3.0"
graphql-tag "^2.12.6"
graphql-tag "^2.12.3"
hoist-non-react-statics "^3.3.2"
optimism "^0.16.1"
prop-types "^15.7.2"
symbol-observable "^4.0.0"
ts-invariant "^0.10.0"
ts-invariant "^0.9.4"
tslib "^2.3.0"
use-sync-external-store "^1.0.0"
zen-observable-ts "^1.2.0"

"@apollo/[email protected]":
Expand Down Expand Up @@ -2782,7 +2781,7 @@
tslib "~2.3.0"
value-or-promise "1.0.11"

"@graphql-typed-document-node/core@^3.1.0", "@graphql-typed-document-node/core@^3.1.1":
"@graphql-typed-document-node/core@^3.0.0", "@graphql-typed-document-node/core@^3.1.0", "@graphql-typed-document-node/core@^3.1.1":
version "3.1.1"
resolved "https://registry.yarnpkg.com/@graphql-typed-document-node/core/-/core-3.1.1.tgz#076d78ce99822258cf813ecc1e7fa460fa74d052"
integrity sha512-NQ17ii0rK1b34VZonlmT2QMJFI70m0TRwbknO/ihlbatXyaktDhN/98vBiUU6kNBPljqGqyIrl2T4nY2RpFANg==
Expand Down Expand Up @@ -8678,7 +8677,7 @@ graphql-subscriptions@^1.1.0:
dependencies:
iterall "^1.3.0"

[email protected], graphql-tag@^2.10.1, graphql-tag@^2.11.0, graphql-tag@^2.12.6:
[email protected], graphql-tag@^2.10.1, graphql-tag@^2.11.0, graphql-tag@^2.12.3:
version "2.12.6"
resolved "https://registry.yarnpkg.com/graphql-tag/-/graphql-tag-2.12.6.tgz#d441a569c1d2537ef10ca3d1633b48725329b5f1"
integrity sha512-FdSNcu2QQcWnM2VNvSCCDCVS5PpPqpzgFT8+GXzqJuoDd0CBncxCY278u4mhRO7tMgo2JjgJA5aZ+nWSQ/Z+xg==
Expand Down Expand Up @@ -12200,7 +12199,7 @@ [email protected]:
css-select "^4.2.1"
css-tree "^1.0.0-alpha.39"

[email protected]:
react-native-web@^0.17.7:
version "0.17.7"
resolved "https://registry.yarnpkg.com/react-native-web/-/react-native-web-0.17.7.tgz#038899dbc94467a0ca0be214b88a30e0c117b176"
integrity sha512-4OOU/QjyRySOXyHfTvljEMS4VXKn42Qs3y9uHDPMwaCUFjwg0oasR/j706OaVgan9kF4Ipa2vJ3F6Z/Xqy8KeQ==
Expand Down Expand Up @@ -13842,10 +13841,10 @@ ts-interface-checker@^0.1.9:
resolved "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699"
integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==

ts-invariant@^0.10.0:
version "0.10.1"
resolved "https://registry.yarnpkg.com/ts-invariant/-/ts-invariant-0.10.1.tgz#df002059ffcc3f94b5064fa74e32796434cd1b06"
integrity sha512-dOmY3naALBtNyK+nrVGzD8DVxSJ9OIHragItZ3XvxGORNAZL6uszgQYaD3PW+TPh2NWNsOpuQUxznuvTkmcdqw==
ts-invariant@^0.9.4:
version "0.9.4"
resolved "https://registry.yarnpkg.com/ts-invariant/-/ts-invariant-0.9.4.tgz#42ac6c791aade267dd9dc65276549df5c5d71cac"
integrity sha512-63jtX/ZSwnUNi/WhXjnK8kz4cHHpYS60AnmA6ixz17l7E12a5puCWFlNpkne5Rl0J8TBPVHpGjsj4fxs8ObVLQ==
dependencies:
tslib "^2.1.0"

Expand Down Expand Up @@ -14351,11 +14350,6 @@ use-sidecar@^1.0.1, use-sidecar@^1.0.5:
dependencies:
object-assign "^4.1.1"

use-sync-external-store@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.1.0.tgz#3343c3fe7f7e404db70f8c687adf5c1652d34e82"
integrity sha512-SEnieB2FPKEVne66NpXPd1Np4R1lTNKfjuy3XdIoPQKYBAFdzbzSZlSn1KJZUiihQLQC5Znot4SBz1EOTBwQAQ==

use@^3.1.0:
version "3.1.1"
resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f"
Expand Down

0 comments on commit c3e3015

Please sign in to comment.