Materialize correctly set uup
This commit is contained in:
1 parent
7f87c4d387
commit
b6cbd26b79
7 files changed
+79
-47
No files matched your search
@@ -5,6 +5,9 @@ const userSchema = new Schema({
|
||||
alias: String,
|
||||
firstName:String,
|
||||
lastName: String,
|
||||
isDeveloper: Boolean,
|
||||
isTrader: Boolean,
|
||||
isDataAnalyst: Boolean,
|
||||
roleId: String
|
||||
})
|
||||
|
||||
|
||||
@@ -27,6 +27,9 @@ const UserType = new GraphQLObjectType({
|
||||
alias: {type: GraphQLString},
|
||||
firstName: {type: GraphQLString},
|
||||
lastName: {type: GraphQLString},
|
||||
isDeveloper: {type: GraphQLString},
|
||||
isTrader: {type: GraphQLString},
|
||||
isDataAnalyst: {type: GraphQLString},
|
||||
roleId: {type: GraphQLString},
|
||||
role: {
|
||||
type: RoleType,
|
||||
@@ -98,6 +101,9 @@ const Mutation = new GraphQLObjectType({
|
||||
alias: {type: new GraphQLNonNull(GraphQLString)},
|
||||
firstName: {type: GraphQLString},
|
||||
lastName: {type: GraphQLString},
|
||||
isDeveloper: {type: GraphQLInt},
|
||||
isTrader: {type: GraphQLInt},
|
||||
isDataAnalyst: {type: GraphQLInt},
|
||||
roleId: {type: new GraphQLNonNull(GraphQLString)}
|
||||
},
|
||||
resolve(parent, args) {
|
||||
@@ -106,6 +112,9 @@ const Mutation = new GraphQLObjectType({
|
||||
alias: args.alias,
|
||||
firstName: args.firstName,
|
||||
lastName: args.lastName,
|
||||
isDeveloper: args.isDeveloper,
|
||||
isTrader: args.isTrader,
|
||||
isDataAnalyst: args.isDataAnalyst,
|
||||
roleId: args.roleId
|
||||
});
|
||||
return user.save();
|
||||
|
||||
Reference in new issue
Block a user