An application for CGI challenge
We now have mutations to addVolunteers (graphql):
var addVolunteering = {
type: graphql.GraphQLList(Volunteering),
args: {
user_id: {
type: new graphql.GraphQLNonNull(graphql.GraphQLString)
},
event_id:{
type: new graphql.GraphQLNonNull(graphql.GraphQLString)
}
},
resolve: function (source, args) {
return new Promise((resolve, reject) => {
var query = INSERT INTO volunteering(user_id,event_id) VALUES(${args.user_id},${args.event_id});
logger.info(filename +"Trying to query '"+query+"'")
db.run(query, function(err, rows) {
if(err){
logger.error(err);
reject(err);
}
logger.info(filename +" '"+query+"' successfully queried")
resolve(rows);
});
});
}
}
https://cdn.discordapp.com/attachments/670655353788301312/671026332838133760/unknown.png
Log in or sign up for Devpost to join the conversation.
The front end of our code is not complete, however our back end is pretty solid. Our graphql functions are working and users are able to see all the associations they are members to as well as all the volunteering events they are planning to attend.
Log in or sign up for Devpost to join the conversation.
Leave feedback in the comments!
Log in or sign up for Devpost to join the conversation.
Log in or sign up for Devpost to join the conversation.