Skip to content
Snippets Groups Projects
Commit d2777472 authored by Wilson JALLET's avatar Wilson JALLET :money_with_wings:
Browse files

Added ldap_confg.json to gitignore

parent c460c5a7
No related branches found
No related tags found
No related merge requests found
......@@ -68,4 +68,5 @@ typings/
# Generated files
doc/
build/
\ No newline at end of file
build/
ldap_config.json
\ No newline at end of file
......@@ -12,7 +12,7 @@ const typeDefs = `
type Query {
allGroups: [Group]
group(uid: ID) : Group
user(uid: ID) : User
user(uid: ID) : [User]
}
type Group {
......@@ -29,8 +29,9 @@ const typeDefs = `
type User {
givenName: String!
lastName: String!
uid: ID!,
birthdate: String!
uid: ID!
birthdate: String
groups: [String]
}
type Mutation {
......@@ -86,6 +87,9 @@ const createGroupIfLegal = (user, args) => {
};
/**
* @description Résolveurs des différentes requêtes GraphQL
*/
const resolvers = {
Query: {
allGroups: (obj, args, context) => {
......@@ -99,7 +103,8 @@ const resolvers = {
return {
lastName: data.sn,
givenName: data.givenName,
birthdate: data.brBirthdate
birthdate: data.brBirthdate,
groups: data.brMemberOf
};
};
......@@ -109,7 +114,7 @@ const resolvers = {
return result;
});
console.log(refactData);
return refactData[0];
return refactData;
});
console.log(result);
return result;
......
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