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 { ...@@ -67,7 +67,7 @@ export abstract class Group {
* @return {string} * @return {string}
* @rights connectedOrOnplatal * @rights connectedOrOnplatal
*/ */
__resolveType(args, context: Context, info): string { __resolveType(context: Context, info): string {
if(this instanceof SimpleGroup) { if(this instanceof SimpleGroup) {
return "SimpleGroup"; return "SimpleGroup";
} }
...@@ -79,6 +79,8 @@ export abstract class Group { ...@@ -79,6 +79,8 @@ export abstract class Group {
} }
} }
__typename : string = "Bad group type";
/** @rights connectedOrOnplatal */ /** @rights connectedOrOnplatal */
gid: string; gid: string;
...@@ -505,6 +507,8 @@ export class SimpleGroup extends Group { ...@@ -505,6 +507,8 @@ export class SimpleGroup extends Group {
* Ci-dessous les resolvers a proprement parler. * Ci-dessous les resolvers a proprement parler.
*/ */
__typename: string = "SimpleGroup";
/** /**
* @memberof GraphQL.SimpleGroup# * @memberof GraphQL.SimpleGroup#
* @function members * @function members
...@@ -729,6 +733,8 @@ export class MetaGroup extends Group { ...@@ -729,6 +733,8 @@ export class MetaGroup extends Group {
* Ci-dessous les resolvers a proprement parler. * Ci-dessous les resolvers a proprement parler.
*/ */
__typename: string = "MetaGroup";
/** /**
* @memberof GraphQL.MetaGroup# * @memberof GraphQL.MetaGroup#
* @function admins * @function admins
......
...@@ -245,13 +245,15 @@ export class User { ...@@ -245,13 +245,15 @@ export class User {
let simple = new GroupSet(this.m_memberOf); let simple = new GroupSet(this.m_memberOf);
let meta = await Tools.metaGroupsOfGroups(simple); let meta = await Tools.metaGroupsOfGroups(simple);
let all: Group[]; let all = new Array<Group>();
for(let gid of simple) { for(let gid of simple) {
all.push(new SimpleGroup(gid)); all.push(new SimpleGroup(gid));
//all.push(await SimpleGroup.tryCreate(gid));
} }
for(let gid of meta) { for(let gid of meta) {
all.push(new MetaGroup(gid)); all.push(new MetaGroup(gid));
//all.push(await MetaGroup.tryCreate(gid));
} }
return all; 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