This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// User's location | |
const userLocation = myUser.get("location"); | |
// Create a query for Restaurants | |
const query = new Parse.Query("Restaurant"); | |
// Interested in locations near the User | |
query.near("location", userLocation); | |
// Limit the result set to 10 objects | |
query.limit(10); | |
// Final list of 10 Restaurants nearest to the User, ordered by Distance ascending | |
const nearRestaurants = await query.find(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.post('/touppercase', inflateParseObject, function(req, res) { | |
let requestData = req.body; | |
let name = requestData.get("name"); | |
requestData.object.set('upperName', name.toUpperCase()); | |
successResponse(res, requestData.object); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query getUserName{ | |
user(id: "MyUser"){ | |
username | |
photo | |
address | |
zipCode | |
country | |
city | |
age | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query getUserName{ | |
user(id: "MyUser"){ | |
username | |
photo | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query Me{ | |
viewer { | |
sessionToken | |
username | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query Me{ | |
viewer { | |
sessionToken | |
username | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query Me { | |
users { | |
me { | |
objectId, | |
createdAt, | |
updatedAt, | |
username, | |
sessionToken | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mutation LogIn{ | |
logIn(fields:{ | |
username: "somefolk" | |
password: "somepassword" | |
}){ | |
id, | |
createdAt, | |
updatedAt, | |
username, | |
sessionToken |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mutation LogIn{ | |
logIn(fields:{ | |
username: "somefolk" | |
password: "somepassword" | |
}){ | |
objectId, | |
createdAt, | |
updatedAt, | |
username, | |
sessionToken |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mutation LogIn { | |
users { | |
logIn(username: "somefolk", password: "somepassword") { | |
objectId, | |
createdAt, | |
updatedAt, | |
username, | |
sessionToken | |
} | |
} |
NewerOlder