NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.
If you are not into long explanations, see [Paolo Bergantino’s answer][2].
NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.
If you are not into long explanations, see [Paolo Bergantino’s answer][2].
| import json | |
| import geojson | |
| from shapely.geometry import shape | |
| o = { | |
| "coordinates": [[[23.314208, 37.768469], [24.039306, 37.768469], [24.039306, 38.214372], [23.314208, 38.214372], [23.314208, 37.768469]]], | |
| "type": "Polygon" | |
| } | |
| s = json.dumps(o) |
| import { AlreadyAuthenticatedError, NotAuthenticatedError, NotAuthorizedError } from '../errors/functional'; | |
| import createResolver from '../lib/createResolver'; | |
| export const baseResolver = createResolver(); | |
| export const isAuthenticatedResolver = baseResolver.createResolver( | |
| (root, args, context) => { | |
| if (!context.user || !context.user.id) throw new NotAuthenticatedError(); | |
| } |
| type Location implements Resource { | |
| # Primary key | |
| id: ID! | |
| # Google's name for the Location | |
| googleName: String! | |
| # Google's ID for the Location | |
| googleId: ID! | |
| # Google's Place ID for the Location | |
| googlePlaceId: ID! | |
| # Google's Timezone ID for the Location |
| 1. Build GraphQL server using `express-graphql` package. | |
| 2. Configure `schema.js` file. | |
| 3. Query for data. |
| var getNode = function(id, type) { | |
| var deferred = q.defer(); | |
| var query = [ | |
| 'START entity=node:nodes(type = {type})', | |
| 'MATCH entity', | |
| 'WHERE entity.id = {id}', | |
| 'RETURN entity;' | |
| ].join('\n'); | |
| var params = { |
| var session = require('./session') | |
| class User { | |
| /** | |
| Creates a User Node in neo4j | |
| * @param {string} uuid (required) - refference id | |
| * @param {string} parentId (required only if reffered by another user) - uuid of parentId | |
| * @param {int/float} sRate (optional) - special rate between user and | |
| * returns Promise | |
| */ | |
| static create(data,parentId=null,sRate = null){ |
| budapest-cluster1 - padded_string:.sfY%T!L8@0N^Av[rDk2 ### budapest_cluster1 József Attila ### fX3,89@:#dHpv< SHA256_hash:128b87316c6eba9f6e3bb947df7797b9da7a0c7dea21b830994d61eb6d4b32d2 | |
| budapest-cluster1 - padded_string:fkI,vcc ### budapest_cluster1 Asszonyok ### taWw]`c,.Jn@OC SHA256_hash:dea023369c9c3f21f1990517bc1cd59a2270e81e3f3d4ffa99deaad9907287a8 | |
| budapest-cluster1 - padded_string:E[B]ZT^ ### budapest_cluster1 Gróf Széchenyi István ### S}zLv[`C>P{eb SHA256_hash:ee8c4047fdd6681cc0919a9aa98b3469505702a626ff603b3f9f5771727e5ea7 | |
| budapest-cluster1 - padded_string:}ZG%mtX.x ### budapest_cluster1 Erkélytartó Férfiak ### 1%A!;HUaMQl SHA256_hash:6b429ce3eb0c1bdbab9d66257aced6446f54cbb31f77e3dbacc23a1e00864943 | |
| budapest-cluster1 - padded_string:8rkToPE^N77^a>N7qEy ### budapest_cluster1 Ikerablak ### 6iRKHNYi|p>m SHA256_hash:63bec01df9cd3859133d8d810daa8e79121e18325104b327f816306df3c162be | |
| budapest-cluster1 - padded_string:joGEUxa[`, ### budapest_cluster1 Nő Profilkép ### Q`JAxeIbLU0{R>}Kmbx SHA256_hash:3295d483a18 |
| 128b87316c6eba9f6e3bb947df7797b9da7a0c7dea21b830994d61eb6d4b32d2 | |
| dea023369c9c3f21f1990517bc1cd59a2270e81e3f3d4ffa99deaad9907287a8 | |
| ee8c4047fdd6681cc0919a9aa98b3469505702a626ff603b3f9f5771727e5ea7 | |
| 6b429ce3eb0c1bdbab9d66257aced6446f54cbb31f77e3dbacc23a1e00864943 | |
| 63bec01df9cd3859133d8d810daa8e79121e18325104b327f816306df3c162be | |
| 3295d483a18fc263dfc5402a9425a1deb85b1e0fd3873d7e1e7228b247e1b65a | |
| e8a86d093e2b929988ad5abb1b99efa0017f94109d28fbddd955ea9ff9763265 | |
| 47cf32ce1d9e3ca094e2fee4223747213a7fb496056dee3a3b044428df0f8b38 | |
| 42d87c04a9a3ff4f3e48ba4bf007e8452bcfa693f02bd59f0485765fa6005222 | |
| fe91d95d6f5d2c0c5631981a30cc2d83a8ff749d180cdaaf834dfa1d4eab5ef0 |
| birmingham-cluster1 - padded_string:9?a)w:`<h1V@dy2K ### birmingham_cluster1 St Catherine of Siena Catholic Church ### `kSd$]+>)x4:,5H&@J{& SHA256_hash:c5492c60357b5a2f97e35127f2ad6a204447ab0d8c7ddc12017fbfb90842513e | |
| birmingham-cluster1 - padded_string:aU>VQ;J.QmjFr5CI.N ### birmingham_cluster1 St Martin's Church ### tQ,}T$Bm)%}Bo$aMU`Rb SHA256_hash:235301cd852589b44333b8b9b1fc5c898b5beaeb30cbfcea92fad9773060ac22 | |
| birmingham-cluster1 - padded_string:!Rd<62K853y}TG ### birmingham_cluster1 The Woodman Traditional Pub ### mjsN?t! SHA256_hash:4b5b46a1b0b055599260db725f11c7760cbfbd50aa3dda9f8c99b8d9b8eb6fb3 | |
| birmingham-cluster1 - padded_string:hMMda?ptfVvIV&^M?;j ### birmingham_cluster1 Thinktank Science Garden ### L{kk|`N$h SHA256_hash:854f663ccfb590d88c7df4d51d6ef475a659918c0b2dba1459952a2069ae6e28 | |
| birmingham-cluster1 - padded_string:zQ.l}uv2V ### birmingham_cluster1 Curves and Discs ### Pg1V+^h9|,3Ktn4m0pi SHA256_hash:fc531e3fa992722ecac5436f9da40ab7ed77b580ae016b7369f3f4affe6715a4 | |
| birmingham-cluster1 - padded_st |