{"info":{"_postman_id":"f33b8a62-9e05-4e7f-a150-6d946b5a1c76","name":"GraphQL - Apartments","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"1795836","collectionId":"f33b8a62-9e05-4e7f-a150-6d946b5a1c76","publishedId":"TzshH51h","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2021-08-05T05:29:44.000Z"},"item":[{"name":"mutations","item":[{"name":"register","id":"55a9c5eb-7e39-4da4-baf8-86be246e9a62","request":{"method":"POST","header":[],"body":{"mode":"graphql","graphql":{"query":"mutation register ($email: String!, $firstName: String!, $lastName: String!, $password: String!) {\n    register (email: $email, firstName: $firstName, lastName: $lastName, password: $password) {\n        id\n        email\n        firstName\n        lastName\n        isLandlord\n    }\n}","variables":"{\n  \"email\": \"\",\n  \"firstName\": \"\",\n  \"lastName\": \"\",\n  \"password\": \"\"\n}"}},"url":"https://node-graphql-rb.herokuapp.com/graphql","description":"<p>Creates an user (password must be provided in clear text (it is stored encrypted)).</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"f33b8a62-9e05-4e7f-a150-6d946b5a1c76","id":"f33b8a62-9e05-4e7f-a150-6d946b5a1c76","name":"GraphQL - Apartments","type":"collection"}},"urlObject":{"host":["https://node-graphql-rb.herokuapp.com/graphql"],"query":[],"variable":[]}},"response":[],"_postman_id":"55a9c5eb-7e39-4da4-baf8-86be246e9a62"},{"name":"createApartment","id":"b77ef563-a8bf-4c59-b89f-6bc7ff0baf9b","request":{"method":"POST","header":[],"body":{"mode":"graphql","graphql":{"query":"mutation createApartment ($userId: Int!, $title: String!, $description: String, $city: String!, $nBedrooms: Int!, $nBathrooms: Int!, $areaM2: Float!, $latitude: Float!, $longitude: Float!, $availableFrom: DateTime) {\n    createApartment (userId: $userId, title: $title, description: $description, city: $city, nBedrooms: $nBedrooms, nBathrooms: $nBathrooms, areaM2: $areaM2, latitude: $latitude, longitude: $longitude, availableFrom: $availableFrom) {\n        id\n        title\n        description\n        city\n        user {\n            id\n            email\n            firstName\n            lastName\n            isLandlord\n        }\n        userId\n        nBedrooms\n        nBathrooms\n        areaM2\n        latitude\n        longitude\n        availableFrom\n        distance\n    }\n}","variables":"{\n  \"userId\": 0,\n  \"title\": \"\",\n  \"description\": \"\",\n  \"city\": \"\",\n  \"nBedrooms\": 0,\n  \"nBathrooms\": 0,\n  \"areaM2\": \"\",\n  \"latitude\": \"\",\n  \"longitude\": \"\",\n  \"availableFrom\": \"\"\n}"}},"url":"https://node-graphql-rb.herokuapp.com/graphql","description":"<p>Creates an apartment.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"f33b8a62-9e05-4e7f-a150-6d946b5a1c76","id":"f33b8a62-9e05-4e7f-a150-6d946b5a1c76","name":"GraphQL - Apartments","type":"collection"}},"urlObject":{"host":["https://node-graphql-rb.herokuapp.com/graphql"],"query":[],"variable":[]}},"response":[],"_postman_id":"b77ef563-a8bf-4c59-b89f-6bc7ff0baf9b"},{"name":"markAsFavorite","id":"a9abdffb-072d-4a21-9eff-206fb03d216e","request":{"method":"POST","header":[],"body":{"mode":"graphql","graphql":{"query":"mutation markAsFavorite ($userId: Int!, $apartmentId: Int!) {\n    markAsFavorite (userId: $userId, apartmentId: $apartmentId) {\n        userId\n        user {\n            id\n            email\n            firstName\n            lastName\n            isLandlord\n        }\n        apartmentId\n        apartment {\n            id\n            title\n            description\n            city\n            user {\n                id\n                email\n                firstName\n                lastName\n                isLandlord\n            }\n            userId\n            nBedrooms\n            nBathrooms\n            areaM2\n            latitude\n            longitude\n            availableFrom\n            distance\n        }\n    }\n}","variables":"{\n  \"userId\": 0,\n  \"apartmentId\": 0\n}"}},"url":"https://node-graphql-rb.herokuapp.com/graphql","description":"<p>Marks an apartment as favorite by one user.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"f33b8a62-9e05-4e7f-a150-6d946b5a1c76","id":"f33b8a62-9e05-4e7f-a150-6d946b5a1c76","name":"GraphQL - Apartments","type":"collection"}},"urlObject":{"host":["https://node-graphql-rb.herokuapp.com/graphql"],"query":[],"variable":[]}},"response":[],"_postman_id":"a9abdffb-072d-4a21-9eff-206fb03d216e"}],"id":"0584fce6-022d-4163-8787-c937df5b8668","_postman_id":"0584fce6-022d-4163-8787-c937df5b8668","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"f33b8a62-9e05-4e7f-a150-6d946b5a1c76","id":"f33b8a62-9e05-4e7f-a150-6d946b5a1c76","name":"GraphQL - Apartments","type":"collection"}}},{"name":"queries","item":[{"name":"users","id":"f5f034fb-2b27-4fb2-ab41-6a498f028872","request":{"method":"POST","header":[],"body":{"mode":"graphql","graphql":{"query":"query users ($id: Int) {\n    users (id: $id) {\n        id\n        email\n        firstName\n        lastName\n        isLandlord\n    }\n}","variables":"{\n  \"id\": 0\n}"}},"url":"https://node-graphql-rb.herokuapp.com/graphql","description":"<p>Lists all users or a specific one. The username is the email.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"f33b8a62-9e05-4e7f-a150-6d946b5a1c76","id":"f33b8a62-9e05-4e7f-a150-6d946b5a1c76","name":"GraphQL - Apartments","type":"collection"}},"urlObject":{"host":["https://node-graphql-rb.herokuapp.com/graphql"],"query":[],"variable":[]}},"response":[],"_postman_id":"f5f034fb-2b27-4fb2-ab41-6a498f028872"},{"name":"login","id":"fb071327-c690-463d-af1c-eaf3ae3d9c9f","request":{"method":"POST","header":[],"body":{"mode":"graphql","graphql":{"query":"query login ($email: String!, $password: String!) {\n    login (email: $email, password: $password) {\n        id\n        email\n        firstName\n        lastName\n        isLandlord\n    }\n}","variables":"{\n  \"email\": \"\",\n  \"password\": \"\"\n}"}},"url":"https://node-graphql-rb.herokuapp.com/graphql","description":"<p>Performs authentication by providing user name (email) and password.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"f33b8a62-9e05-4e7f-a150-6d946b5a1c76","id":"f33b8a62-9e05-4e7f-a150-6d946b5a1c76","name":"GraphQL - Apartments","type":"collection"}},"urlObject":{"host":["https://node-graphql-rb.herokuapp.com/graphql"],"query":[],"variable":[]}},"response":[],"_postman_id":"fb071327-c690-463d-af1c-eaf3ae3d9c9f"},{"name":"apartments","id":"3ac8e2f9-bfa6-4e71-af97-60ceee1e2b2f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"graphql","graphql":{"query":"query apartments ($id: Int, $nBathrooms: Int, $nBedrooms: Int, $city: String) {\n    apartments (id: $id, nBathrooms: $nBathrooms, nBedrooms: $nBedrooms, city: $city) {\n        id\n        title\n        description\n        city\n        user {\n            id\n            email\n            firstName\n            lastName\n            isLandlord\n        }\n        userId\n        nBedrooms\n        nBathrooms\n        areaM2\n        latitude\n        longitude\n        availableFrom\n        distance\n    }\n}","variables":"{\n  \"id\": 0,\n  \"nBathrooms\": 0,\n  \"nBedrooms\": 0\n}"}},"url":"https://node-graphql-rb.herokuapp.com/graphql","description":"<p>Lists all apartments or a specific one.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"f33b8a62-9e05-4e7f-a150-6d946b5a1c76","id":"f33b8a62-9e05-4e7f-a150-6d946b5a1c76","name":"GraphQL - Apartments","type":"collection"}},"urlObject":{"host":["https://node-graphql-rb.herokuapp.com/graphql"],"query":[],"variable":[]}},"response":[],"_postman_id":"3ac8e2f9-bfa6-4e71-af97-60ceee1e2b2f"},{"name":"apartmentsGeoLoc","id":"f2bdfbe8-1d7f-48d9-b65f-78db000524e2","request":{"method":"POST","header":[],"body":{"mode":"graphql","graphql":{"query":"query apartmentsGeoLoc ($currLatitude: Float!, $currLongitude: Float!, $distanceKm: Float!) {\n    apartmentsGeoLoc (currLatitude: $currLatitude, currLongitude: $currLongitude, distanceKm: $distanceKm) {\n        id\n        title\n        description\n        city\n        user {\n            id\n            email\n            firstName\n            lastName\n            isLandlord\n        }\n        userId\n        nBedrooms\n        nBathrooms\n        areaM2\n        latitude\n        longitude\n        availableFrom\n        distance\n    }\n}","variables":"{\n  \"currLatitude\": \"\",\n  \"currLongitude\": \"\",\n  \"distanceKm\": \"\"\n}"}},"url":"https://node-graphql-rb.herokuapp.com/graphql","description":"<p>List all apartments located at a distance less than or equal to the one provided.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"f33b8a62-9e05-4e7f-a150-6d946b5a1c76","id":"f33b8a62-9e05-4e7f-a150-6d946b5a1c76","name":"GraphQL - Apartments","type":"collection"}},"urlObject":{"host":["https://node-graphql-rb.herokuapp.com/graphql"],"query":[],"variable":[]}},"response":[],"_postman_id":"f2bdfbe8-1d7f-48d9-b65f-78db000524e2"},{"name":"favorites","id":"7d7b23d8-e9e5-464a-9367-3eb99a8e2136","request":{"method":"POST","header":[],"body":{"mode":"graphql","graphql":{"query":"query favorites ($userId: Int, $apartmentId: Int) {\n    favorites (userId: $userId, apartmentId: $apartmentId) {\n        userId\n        user {\n            id\n            email\n            firstName\n            lastName\n            isLandlord\n        }\n        apartmentId\n        apartment {\n            id\n            title\n            description\n            city\n            user {\n                id\n                email\n                firstName\n                lastName\n                isLandlord\n            }\n            userId\n            nBedrooms\n            nBathrooms\n            areaM2\n            latitude\n            longitude\n            availableFrom\n            distance\n        }\n    }\n}","variables":"{\n  \"userId\": 0,\n  \"apartmentId\": 0\n}"}},"url":"https://node-graphql-rb.herokuapp.com/graphql","description":"<p>Lists all apartments marked as favorite or a specific one.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"f33b8a62-9e05-4e7f-a150-6d946b5a1c76","id":"f33b8a62-9e05-4e7f-a150-6d946b5a1c76","name":"GraphQL - Apartments","type":"collection"}},"urlObject":{"host":["https://node-graphql-rb.herokuapp.com/graphql"],"query":[],"variable":[]}},"response":[],"_postman_id":"7d7b23d8-e9e5-464a-9367-3eb99a8e2136"}],"id":"185a26bf-26a4-4ccf-a06f-48b7f6996dbd","_postman_id":"185a26bf-26a4-4ccf-a06f-48b7f6996dbd","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"f33b8a62-9e05-4e7f-a150-6d946b5a1c76","id":"f33b8a62-9e05-4e7f-a150-6d946b5a1c76","name":"GraphQL - Apartments","type":"collection"}}}],"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]}},"event":[{"listen":"prerequest","script":{"id":"a221e596-8c45-4066-93b8-da0a405268eb","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"ddcd996d-8a8c-40f9-a7b3-4f01f9d89eb6","type":"text/javascript","exec":[""]}}],"variable":[{"key":"url","value":"https://node-graphql-rb.herokuapp.com/graphql"}]}