Skip to content

Commit

Permalink
BA-Add-mobile-graphql-environment (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
ficast authored Dec 20, 2024
1 parent 0ec8ff1 commit 33a990b
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 5 deletions.
7 changes: 7 additions & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @baseapp-frontend/components

## 0.0.35

### Patch Changes

- Updated dependencies
- @baseapp-frontend/graphql@1.1.14

## 0.0.34

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@baseapp-frontend/components",
"description": "BaseApp components modules such as comments, notifications, messages, and more.",
"version": "0.0.34",
"version": "0.0.35",
"main": "./index.ts",
"types": "dist/index.d.ts",
"sideEffects": false,
Expand Down
6 changes: 6 additions & 0 deletions packages/graphql/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @baseapp-frontend/graphql

## 1.1.14

### Patch Changes

- Add graphql support to Expo/Mobile environment

## 1.1.13

### Patch Changes
Expand Down
6 changes: 4 additions & 2 deletions packages/graphql/config/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ export async function httpFetch(
): Promise<GraphQLResponse> {
const fetchOptions = getFetchOptions({ request, variables, uploadables })
const response = await baseAppFetch('', {
baseUrl: process.env.NEXT_PUBLIC_RELAY_ENDPOINT,
baseUrl: (process.env.NEXT_PUBLIC_RELAY_ENDPOINT ||
process.env.EXPO_PUBLIC_RELAY_ENDPOINT) as string,
decamelizeRequestBodyKeys: false,
decamelizeRequestParamsKeys: false,
camelizeResponseDataKeys: false,
Expand All @@ -89,7 +90,8 @@ export async function httpFetch(
}

const wsClient = createClient({
url: process.env.NEXT_PUBLIC_WS_RELAY_ENDPOINT as string,
url: (process.env.NEXT_PUBLIC_WS_RELAY_ENDPOINT ||
process.env.EXPO_PUBLIC_WS_RELAY_ENDPOINT) as string,
connectionParams: () => {
const Authorization = getToken()
if (!Authorization) return {}
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@baseapp-frontend/graphql",
"description": "GraphQL configurations and utilities",
"version": "1.1.13",
"version": "1.1.14",
"main": "./index.ts",
"types": "dist/index.d.ts",
"sideEffects": false,
Expand Down
7 changes: 7 additions & 0 deletions packages/wagtail/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @baseapp-frontend/wagtail

## 1.0.9

### Patch Changes

- Updated dependencies
- @baseapp-frontend/graphql@1.1.14

## 1.0.8

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/wagtail/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@baseapp-frontend/wagtail",
"description": "BaseApp Wagtail",
"version": "1.0.8",
"version": "1.0.9",
"main": "./index.ts",
"types": "dist/index.d.ts",
"sideEffects": false,
Expand Down

0 comments on commit 33a990b

Please sign in to comment.