Rothamsted / graphql-api

KnetMiner Platform API BETA
Apache License 2.0
1 stars 1 forks source link

KnetMiner GraphQL API BETA

We are beginning to migrate the existing KnetMiner REST API built using the OndexGraph library and Java Spring to the GRANDstack. As we transition to GRAND, our first goal is to rebuild 11+ API endpoints using Apollo-GraphQL, the Neo4j GraphQL Library and our Neo4j DB which are modelled using BioSchemas and serveral ontologies.

Description of existing REST APIs and wishlist of new APIs will be gathered in this Google Doc. Contributions are welcome!

Other related repositories to check out are the knetminer-backend based on Neo4j (and legacy Ondex) and knetminer.

KnetMiner Neo4j and Cypher queries for testing

Wheat Neo4j:

Arabidopsis Neo4j:

COVID-19 Neo4j:

Neo4j Cypher traverser/queries used in KnetMiner

Getting started

The process of testing GraphQL and developing a schema for our current data models could be started by wrapping the existing KnetMiner REST API using these resources:

This could allow us to get started writing type definitions for the JSON objects returned from the current API. To start using the Neo4j-GraphQL integration (@neo4j/graphql), we'd only need to add that and the NodeJS based Neo4j driver (neo4j-driver), in order for the Apollo Server communicate with our Neo4j DB. Wrapping the existing REST API isn't necessary, but it could be a quicker way to get started in order to prevent needing to migrate all the Java logic to NodeJS. Either way, we could make a GraphQL schema organized in a manner similar to the below repository (developed by @michaeldgraham), with various Neo4j-GraphQL features:

The KnetMiner Team - where knowledge grows. :)