Skip to content
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.

For Reference... #1

Open
ProjectCheshire opened this issue Oct 7, 2017 · 3 comments
Open

For Reference... #1

ProjectCheshire opened this issue Oct 7, 2017 · 3 comments

Comments

@ProjectCheshire
Copy link

  1. I wish this was about 6 months ago! This is exactly what I was struggling with - I ended up basing an implementation off https://github.com/joefraley/humane-society-api

I ended up having such fits with js that I ended up moving my api over to python and using neomodel + graphene and then just sticking the api into the network interface param for Apollo for the frontend (since I want to use deckgl and the assorted gl data components that uber eng semi-recently published)

Request: An example of how to use graphql + neo4j spatial. I haven't prodded too hard at that, yet and usually resort to query.execute(cypherstring) but I'm sure there is a more elegant way.

(I am not sure how best to 'comment' as Issue seems the wrong term.)

@johnymontana
Copy link
Contributor

@ProjectCheshire Your project sounds cool! Is it live somewhere that I can check out?

I can certainly add an example of using GraphQL with neo4j-spatial. It should be fairly straightforward now that we have Cypher procedures for spatial and the @cypher directive for mapping Cypher queries to GraphQL fields. So something like this:

type City {
  name: String
  nearbyCities(distance: Int): [City] @cypher(statement:"CALL spatial.withinDistance('someLayer', this, distance)")
}

This fits nicely with a demo I'm working on now actually so I'll add an example soon. Thanks for the idea!

@ProjectCheshire
Copy link
Author

ProjectCheshire commented Oct 7, 2017

The current project, no. But what this lib/toolset does do (you have no idea how excited I am for this.) as well as the discussion around schema stitching is allow me to realistically back the EdgeX foundry collection of services with graphQL and bridge to the various databases I need to interface with. (EdgeX is an open source iot platform / interface set. By day, I mostly work on C / compilers/kernels. EdgeX comes stock with mongo and I've been wanting to replace the back end with graphQL as an API and a better db connection / swap. Neo4j fit very nicely into AllJoyn data model, but that was superseded with the Linux Foundation into the EdgeX Foundry.) A realistic deployment will bridge several database types and need to support both RTOS and high latency / BLE / cached services for devices. (The current investigation is class 1 medical devices in a related ecosystem)

EdgeX is open source (and always looking for member organizations / contributors) so when I finally get that prototyped, I'll be sure to share :)

Also - pardon me while I squee about the cypher directives. I feel like everything has evolved so much in the past 6 months and things are finally really gelling with neo4j + graphQL especially.

johnymontana pushed a commit that referenced this issue Aug 22, 2018
johnymontana pushed a commit that referenced this issue Nov 6, 2019
…ce-types

Support for Interface type queries
@michaeldgraham
Copy link
Collaborator

#608 :/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants