diff --git a/.env b/.env index ed1469567..a9e862227 100644 --- a/.env +++ b/.env @@ -2,8 +2,8 @@ REACT_APP_ID= # Hasura REACT_APP_API_BASE_ROOT= -REACT_APP_GRAPHQL_ENDPOINT= REACT_APP_GRAPHQL_PH_ENDPOINT= +REACT_APP_GRAPHQL_RH_ENDPOINT= REACT_APP_GRAPHQL_WS_ENDPOINT= diff --git a/.env.development b/.env.development index 28f6e34b7..8585a73b8 100644 --- a/.env.development +++ b/.env.development @@ -4,9 +4,8 @@ REACT_APP_ID=demo # Hasura REACT_APP_API_BASE_ROOT=https://demo.lodestar-dev.cc/api/v1 -REACT_APP_GRAPHQL_ENDPOINT=https://hdb-dev.kolable.com/v1/graphql -REACT_APP_GRAPHQL_RH_ENDPOINT=https://rhdb-dev.kolable.com/v1/graphql REACT_APP_GRAPHQL_PH_ENDPOINT=https://phdb-dev.kolable.com/v1/graphql +REACT_APP_GRAPHQL_RH_ENDPOINT=https://rhdb-dev.kolable.com/v1/graphql REACT_APP_GRAPHQL_WS_ENDPOINT=wss://hasura-dev.kolable.com/v1/graphql # AWS diff --git a/.env.production b/.env.production index baaf26845..35e6a9a8a 100644 --- a/.env.production +++ b/.env.production @@ -1,6 +1,5 @@ # Hasura REACT_APP_API_BASE_ROOT=/api/v1 -REACT_APP_GRAPHQL_ENDPOINT=https://hdb.kolable.com/v1/graphql REACT_APP_GRAPHQL_PH_ENDPOINT=https://phdb.kolable.com/v1/graphql REACT_APP_GRAPHQL_WS_ENDPOINT=wss://hdb.kolable.com/v1/graphql diff --git a/.env.staging b/.env.staging index 0b59c253a..ae968321f 100644 --- a/.env.staging +++ b/.env.staging @@ -1,6 +1,5 @@ # Hasura REACT_APP_API_BASE_ROOT=/api/v1 -REACT_APP_GRAPHQL_ENDPOINT=https://hdb-dev.kolable.com/v1/graphql REACT_APP_GRAPHQL_PH_ENDPOINT=https://phdb-dev.kolable.com/v1/graphql REACT_APP_GRAPHQL_RH_ENDPOINT=https://rhdb-dev.kolable.com/v1/graphql REACT_APP_GRAPHQL_WS_ENDPOINT=wss://hasura-dev.kolable.com/v1/graphql diff --git a/codegen.ts b/codegen.ts index 9de95dff5..0c1867cf6 100644 --- a/codegen.ts +++ b/codegen.ts @@ -3,7 +3,7 @@ import { CodegenConfig } from '@graphql-codegen/cli' console.log(process.env.NODE_ENV) const config: CodegenConfig = { - schema: process.env.REACT_APP_GRAPHQL_ENDPOINT, + schema: process.env.REACT_APP_GRAPHQL_PH_ENDPOINT, documents: ['src/**/*.ts', 'src/**/*.tsx'], generates: { './src/hasura.d.ts': { diff --git a/src/components/auth/RegisterSection.tsx b/src/components/auth/RegisterSection.tsx index 7ed8dcb5f..a8e22c382 100644 --- a/src/components/auth/RegisterSection.tsx +++ b/src/components/auth/RegisterSection.tsx @@ -164,9 +164,9 @@ const RegisterSection: React.VFC = ({ form, isBusinessMemb await uploadFile(path, companyPictureFile, authToken) } - process.env.REACT_APP_GRAPHQL_ENDPOINT && + process.env.REACT_APP_GRAPHQL_PH_ENDPOINT && Axios.post( - process.env.REACT_APP_GRAPHQL_ENDPOINT, + process.env.REACT_APP_GRAPHQL_PH_ENDPOINT, { query: `mutation UPDATE_MEMBER_INFO($memberId: String!, $setMember: member_set_input, $memberProperties: [member_property_insert_input!]!) { update_member(where: { id: { _eq: $memberId } }, _set: $setMember) { diff --git a/src/components/common/SignupPropertySection.tsx b/src/components/common/SignupPropertySection.tsx index 4aae29c63..00e380fee 100644 --- a/src/components/common/SignupPropertySection.tsx +++ b/src/components/common/SignupPropertySection.tsx @@ -81,9 +81,9 @@ const SignupPropertySection: React.VFC = ({ form, onMo value: value, } }) - process.env.REACT_APP_GRAPHQL_ENDPOINT && + process.env.REACT_APP_GRAPHQL_PH_ENDPOINT && Axios.post( - process.env.REACT_APP_GRAPHQL_ENDPOINT, + process.env.REACT_APP_GRAPHQL_PH_ENDPOINT, { query: `mutation UPDATE_MEMBER_INFO($memberId: String!, $name: String, $memberProperties: [member_property_insert_input!]!) { update_member(where: {id: {_eq: $memberId}}, _set: {name: $name}) {