View NearRestaurantsQuery.js
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(); |
View objectPropetyToUpper.js
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); | |
}); |
View getUserProfile.graphql
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 | |
} |
View getUserName.graphql
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 | |
} | |
} |
View me39.graphql
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 | |
} | |
} |
View me38.graphql
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 | |
} | |
} |
View me372.graphql
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 | |
} | |
} |
View logIn39.graphql
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 |
View logIn38.graphql
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 |
View logIn372.graphql
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