Skip to content
Snippets Groups Projects
Commit b68b81fe authored by Olivér FACKLAM's avatar Olivér FACKLAM
Browse files

Correction Resolvers

parent 1b6e303f
No related branches found
No related tags found
No related merge requests found
......@@ -67,7 +67,7 @@ export abstract class Group {
* @return {string}
* @rights connectedOrOnplatal
*/
__resolveType(args, context: Context, info): string {
__resolveType(context: Context, info): string {
if(this instanceof SimpleGroup) {
return "SimpleGroup";
}
......@@ -79,6 +79,8 @@ export abstract class Group {
}
}
__typename : string = "Bad group type";
/** @rights connectedOrOnplatal */
gid: string;
......@@ -505,6 +507,8 @@ export class SimpleGroup extends Group {
* Ci-dessous les resolvers a proprement parler.
*/
__typename: string = "SimpleGroup";
/**
* @memberof GraphQL.SimpleGroup#
* @function members
......@@ -729,6 +733,8 @@ export class MetaGroup extends Group {
* Ci-dessous les resolvers a proprement parler.
*/
__typename: string = "MetaGroup";
/**
* @memberof GraphQL.MetaGroup#
* @function admins
......
......@@ -245,13 +245,15 @@ export class User {
let simple = new GroupSet(this.m_memberOf);
let meta = await Tools.metaGroupsOfGroups(simple);
let all: Group[];
let all = new Array<Group>();
for(let gid of simple) {
all.push(new SimpleGroup(gid));
//all.push(await SimpleGroup.tryCreate(gid));
}
for(let gid of meta) {
all.push(new MetaGroup(gid));
//all.push(await MetaGroup.tryCreate(gid));
}
return all;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment