@vocollege/app 0.0.111 → 0.0.114

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -113,7 +113,31 @@ var GraphClient = /** @class */ (function () {
113
113
  // const links = this.getGraphClientLinks(getToken, refreshToken);
114
114
  var links = this.getGraphClientLinks(params);
115
115
  return new client_1.ApolloClient({
116
- cache: new client_1.InMemoryCache(),
116
+ cache: new client_1.InMemoryCache({
117
+ typePolicies: {
118
+ Education: {
119
+ keyFields: function (object, context) {
120
+ if (!object.hasOwnProperty("pivot")) {
121
+ return ["id"];
122
+ }
123
+ return [
124
+ "id",
125
+ "pivot",
126
+ ["education_usage_id", "education_usage_type", "field"],
127
+ ];
128
+ },
129
+ },
130
+ // PivotEducation: {
131
+ // // keyFields: ["education_usage_id"],
132
+ // keyFields: [
133
+ // "education_id",
134
+ // "education_usage_id",
135
+ // "education_usage_type",
136
+ // "field",
137
+ // ],
138
+ // },
139
+ },
140
+ }),
117
141
  link: (0, client_1.from)([
118
142
  links.errorLink,
119
143
  links.authLink,
@@ -6,7 +6,7 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.GET_GROUPS_PERMISSIONS = exports.GET_GROUPS_ROLES = exports.GET_GROUPS_ROLE = exports.GET_GROUPS_ACL = exports.GET_GROUPS = exports.GET_AVAILABLE_GROUPS = exports.GET_GROUP = void 0;
8
8
  var client_1 = require("@apollo/client");
9
- exports.GET_GROUP = (0, client_1.gql)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n query Group($id: ID!, $categories: [String]) {\n group(id: $id) {\n id\n name\n title\n description\n body\n category\n docs\n website\n educator_category\n educator_type\n certified\n status\n url\n created_at\n updated_at\n parentGroupId\n parentGroups {\n id\n name\n title\n category\n }\n location {\n id\n latitude\n longitude\n }\n logo {\n id\n title\n filename\n filesize\n filetype\n url\n }\n logo2 {\n id\n title\n filename\n filesize\n filetype\n url\n }\n logo3 {\n id\n title\n filename\n filesize\n filetype\n url\n }\n users {\n id\n name\n email\n firstname\n lastname\n type\n groupRoles {\n id\n label\n type\n }\n }\n contacts {\n id\n title\n type\n }\n vopage\n front_title\n front_body\n images {\n id\n title\n filename\n filesize\n filetype\n url\n }\n educations {\n id\n title\n code\n type\n pivot {\n field\n certified\n comments\n }\n }\n }\n allGroups(categories: $categories) {\n id\n title\n }\n }\n"], ["\n query Group($id: ID!, $categories: [String]) {\n group(id: $id) {\n id\n name\n title\n description\n body\n category\n docs\n website\n educator_category\n educator_type\n certified\n status\n url\n created_at\n updated_at\n parentGroupId\n parentGroups {\n id\n name\n title\n category\n }\n location {\n id\n latitude\n longitude\n }\n logo {\n id\n title\n filename\n filesize\n filetype\n url\n }\n logo2 {\n id\n title\n filename\n filesize\n filetype\n url\n }\n logo3 {\n id\n title\n filename\n filesize\n filetype\n url\n }\n users {\n id\n name\n email\n firstname\n lastname\n type\n groupRoles {\n id\n label\n type\n }\n }\n contacts {\n id\n title\n type\n }\n vopage\n front_title\n front_body\n images {\n id\n title\n filename\n filesize\n filetype\n url\n }\n educations {\n id\n title\n code\n type\n pivot {\n field\n certified\n comments\n }\n }\n }\n allGroups(categories: $categories) {\n id\n title\n }\n }\n"])));
9
+ exports.GET_GROUP = (0, client_1.gql)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n query Group($id: ID!, $categories: [String]) {\n group(id: $id) {\n id\n name\n title\n description\n body\n category\n docs\n website\n educator_category\n educator_type\n certified\n status\n url\n created_at\n updated_at\n parentGroupId\n parentGroups {\n id\n name\n title\n category\n }\n location {\n id\n latitude\n longitude\n }\n logo {\n id\n title\n filename\n filesize\n filetype\n url\n }\n logo2 {\n id\n title\n filename\n filesize\n filetype\n url\n }\n logo3 {\n id\n title\n filename\n filesize\n filetype\n url\n }\n users {\n id\n name\n email\n firstname\n lastname\n type\n groupRoles {\n id\n label\n type\n }\n }\n contacts {\n id\n title\n type\n }\n vopage\n front_title\n front_body\n images {\n id\n title\n filename\n filesize\n filetype\n url\n }\n educations {\n id\n title\n code\n type\n pivot {\n education_id\n education_usage_id\n education_usage_type\n field\n certified\n comments\n }\n }\n }\n allGroups(categories: $categories) {\n id\n title\n }\n }\n"], ["\n query Group($id: ID!, $categories: [String]) {\n group(id: $id) {\n id\n name\n title\n description\n body\n category\n docs\n website\n educator_category\n educator_type\n certified\n status\n url\n created_at\n updated_at\n parentGroupId\n parentGroups {\n id\n name\n title\n category\n }\n location {\n id\n latitude\n longitude\n }\n logo {\n id\n title\n filename\n filesize\n filetype\n url\n }\n logo2 {\n id\n title\n filename\n filesize\n filetype\n url\n }\n logo3 {\n id\n title\n filename\n filesize\n filetype\n url\n }\n users {\n id\n name\n email\n firstname\n lastname\n type\n groupRoles {\n id\n label\n type\n }\n }\n contacts {\n id\n title\n type\n }\n vopage\n front_title\n front_body\n images {\n id\n title\n filename\n filesize\n filetype\n url\n }\n educations {\n id\n title\n code\n type\n pivot {\n education_id\n education_usage_id\n education_usage_type\n field\n certified\n comments\n }\n }\n }\n allGroups(categories: $categories) {\n id\n title\n }\n }\n"])));
10
10
  exports.GET_AVAILABLE_GROUPS = (0, client_1.gql)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n query Group($categories: [String], $byPassMembership: Boolean) {\n allGroups(categories: $categories, byPassMembership: $byPassMembership) {\n id\n title\n category\n }\n }\n"], ["\n query Group($categories: [String], $byPassMembership: Boolean) {\n allGroups(categories: $categories, byPassMembership: $byPassMembership) {\n id\n title\n category\n }\n }\n"])));
11
11
  exports.GET_GROUPS = (0, client_1.gql)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n query Groups(\n $search: String\n $page: Int\n $limit: Int\n $orderBy: [GetGroupsOrderByClause]\n $filters: [GetGroupsFilter]\n ) {\n groups(\n search: $search\n page: $page\n limit: $limit\n orderBy: $orderBy\n filters: $filters\n ) {\n paginatorInfo {\n total\n currentPage\n hasMorePages\n }\n data {\n id\n name\n title\n category\n status\n vopage\n created_at\n updated_at\n }\n }\n }\n"], ["\n query Groups(\n $search: String\n $page: Int\n $limit: Int\n $orderBy: [GetGroupsOrderByClause]\n $filters: [GetGroupsFilter]\n ) {\n groups(\n search: $search\n page: $page\n limit: $limit\n orderBy: $orderBy\n filters: $filters\n ) {\n paginatorInfo {\n total\n currentPage\n hasMorePages\n }\n data {\n id\n name\n title\n category\n status\n vopage\n created_at\n updated_at\n }\n }\n }\n"])));
12
12
  exports.GET_GROUPS_ACL = (0, client_1.gql)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n query GetGroupsAcl {\n groupsRoles {\n id\n name\n label\n }\n groupsPermissions {\n id\n subject\n name\n label\n roles {\n id\n }\n }\n }\n"], ["\n query GetGroupsAcl {\n groupsRoles {\n id\n name\n label\n }\n groupsPermissions {\n id\n subject\n name\n label\n roles {\n id\n }\n }\n }\n"])));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vocollege/app",
3
- "version": "0.0.111",
3
+ "version": "0.0.114",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -67,7 +67,32 @@ class GraphClient {
67
67
  const links = this.getGraphClientLinks(params);
68
68
 
69
69
  return new ApolloClient({
70
- cache: new InMemoryCache(),
70
+ cache: new InMemoryCache({
71
+ typePolicies: {
72
+ Education: {
73
+ keyFields: (object, context) => {
74
+ if (!object.hasOwnProperty("pivot")) {
75
+ return ["id"];
76
+ }
77
+
78
+ return [
79
+ "id",
80
+ "pivot",
81
+ ["education_usage_id", "education_usage_type", "field"],
82
+ ];
83
+ },
84
+ },
85
+ // PivotEducation: {
86
+ // // keyFields: ["education_usage_id"],
87
+ // keyFields: [
88
+ // "education_id",
89
+ // "education_usage_id",
90
+ // "education_usage_type",
91
+ // "field",
92
+ // ],
93
+ // },
94
+ },
95
+ }),
71
96
  link: from([
72
97
  links.errorLink,
73
98
  links.authLink,
@@ -91,6 +91,9 @@ export const GET_GROUP = gql`
91
91
  code
92
92
  type
93
93
  pivot {
94
+ education_id
95
+ education_usage_id
96
+ education_usage_type
94
97
  field
95
98
  certified
96
99
  comments