@lenne.tech/ng-base 13.10.5 → 13.11.0
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.
- package/esm2020/shared/classes/graphql-meta.class.mjs +44 -1
- package/fesm2015/lenne.tech-ng-base-shared.mjs +43 -0
- package/fesm2015/lenne.tech-ng-base-shared.mjs.map +1 -1
- package/fesm2020/lenne.tech-ng-base-shared.mjs +43 -0
- package/fesm2020/lenne.tech-ng-base-shared.mjs.map +1 -1
- package/package.json +1 -1
- package/shared/classes/graphql-meta.class.d.ts +14 -1
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GraphQLNamedType, GraphQLSchema } from 'graphql';
|
|
2
2
|
import { GraphQLRequestType } from '../enums/graphql-request-type.enum';
|
|
3
3
|
import { GraphQLType } from './graphql-type.class';
|
|
4
4
|
import { IGraphQLTypeCollection } from '../interfaces/graphql-type-collection.interface';
|
|
@@ -13,6 +13,19 @@ export declare class GraphQLMeta {
|
|
|
13
13
|
* Integrate schema
|
|
14
14
|
*/
|
|
15
15
|
constructor(schema: GraphQLSchema);
|
|
16
|
+
/**
|
|
17
|
+
* We're going to get the query and mutation types from the schema, then we're going to loop through the fields of each
|
|
18
|
+
* type and check if the field name starts with `find`, `create`, `update`, or `delete`. If it does, we're going to add
|
|
19
|
+
* the model name to the `possibleTypes` array
|
|
20
|
+
*
|
|
21
|
+
* @returns An array of objects with the name of the model, and the CRUD operations that are available for that model.
|
|
22
|
+
*/
|
|
23
|
+
getTypes(): [{
|
|
24
|
+
name: string;
|
|
25
|
+
create: boolean;
|
|
26
|
+
update: boolean;
|
|
27
|
+
delete: boolean;
|
|
28
|
+
}];
|
|
16
29
|
/**
|
|
17
30
|
* Get arguments of GraphQL function
|
|
18
31
|
*/
|