We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d3f0990 + 5e733f1 commit f2a1d44Copy full SHA for f2a1d44
packages/app-provider/src/ApolloContainer.tsx
@@ -52,6 +52,7 @@ const ApolloContainer: React.ComponentType<ApolloContainerProps> = withAuth(
52
onRequestError: this.props.onRequestError,
53
onRequestSuccess: this.props.onRequestSuccess,
54
uri: this.props.uri,
55
+ subscriptionUri: this.props.subscriptionUri,
56
withSubscriptions,
57
};
58
packages/app-provider/src/AppProvider.tsx
@@ -30,6 +30,7 @@ type PrefilledApolloContainerProps =
30
/**
31
* `AppProvider` universal provider which loads fragments schema and provides Apollo client with it, authentication and table schema.
32
* @prop {string} [uri] - The 8base API field schema.
33
+ * @prop {string} [subscriptionUri] Endpoint of the GraphQl websocket server.
34
* @prop {Object} [authClient] - The 8base auth client.
35
* @prop {Function} [onRequestSuccess] - The callback which called when request is success.
36
* @prop {Function} [onRequestError] - The callback which called when request is fail.
@@ -41,6 +42,7 @@ type PrefilledApolloContainerProps =
41
42
*/
43
const AppProvider = ({
44
uri,
45
+ subscriptionUri,
46
authClient,
47
onRequestSuccess,
48
onRequestError,
@@ -63,6 +65,7 @@ const AppProvider = ({
63
65
<ApolloContainer
64
66
withSubscriptions={withSubscriptions}
67
uri={uri}
68
+ subscriptionUri={subscriptionUri}
69
extendLinks={extendLinks}
70
onRequestSuccess={onRequestSuccess}
71
onRequestError={onRequestError}
packages/app-provider/src/types.ts
@@ -4,6 +4,7 @@ import { IAuthState, TableSchema, Application } from '@8base/utils';
4
5
export type ApolloContainerPassedProps = {
6
uri: string;
7
+ subscriptionUri?: string;
8
autoSignUp?: boolean;
9
withSubscriptions?: boolean;
10
authProfileId?: string;
packages/app-provider/test/__tests__/AppProvider.test.tsx
@@ -86,6 +86,7 @@ describe('AppProvider', () => {
86
"onIdTokenExpired": [Function],
87
"onRequestError": [MockFunction],
88
"onRequestSuccess": [MockFunction],
89
+ "subscriptionUri": undefined,
90
"uri": "http://8base.com",
91
"withAuth": true,
92
"withSubscriptions": false,
@@ -140,6 +141,7 @@ describe('AppProvider', () => {
140
141
142
143
144
145
146
147
@@ -178,6 +180,7 @@ describe('AppProvider', () => {
178
180
"extendLinks": [MockFunction],
179
181
182
183
184
185
"withAuth": false,
186
packages/crud/src/RecordCrud.tsx
@@ -32,7 +32,7 @@ const createRecordTag = (tableSchema: TableSchema, mode: CrudModes, options: Que
case 'delete':
return createTableRowDeleteTag([tableSchema], tableSchema.id);
default:
- return null;
+ return '';
}
37
38
packages/permissions-provider/package.json
@@ -24,7 +24,7 @@
24
"ramda": "^0.26.1"
25
},
26
"devDependencies": {
27
- "@types/graphql": "^0.13.0",
+ "@types/graphql": "^14.2.0",
28
"@types/jest": "^24.0.13",
29
"@types/react-test-renderer": "^16.8.1",
"apollo-client": "^2.6.3",
0 commit comments