Can we regenerate subgraph from the supergraph in GraphQL/Apollo Federation? - graphql

I need to know Is that possible or not.
For example we have 3 api and each have their subgraph and we have implemented federation.
By Using federation we have created Single Truth of Source that is Supergraph.
Now I want to regenerate All 3 Subgraphs by using Supergraph.

Related

how to implement graphql with java with nebula graph like dgraph

I have a java project
I have a nebula graph to save all my information
I need to have graphql queries
I implement it but we need a dynamic schema
so we save our schema for any of dynamic entity types
for example
our users want to have dynamic datatypes that we implement and save in nebula graph
our users can save vertex as items
after that we need to have endpoint for query in our all vertex that saved by those data types
https://dgraph.io/docs/graphql/queries/search-filtering/
we need to post our request like this
how can we implement it better
we have a good cache of our datatypes in the java layer.
is there any suggestion for us?
For now, there is no GraphQL support/parsing layer implementation for NebulaGraph.
For java connector, there are some abstraction layers there, could you take a look at them?
https://github.com/nebula-contrib/graph-ocean
https://github.com/nebula-contrib/ngbatis
https://github.com/nebula-contrib/nebula-jdbc
Also, equivlant queries(towards graphql) could be composed, too to return complex things in OpenCypher.

How to find all system schemas in a given Vertex metadataStore?

Vertex ML Metadata publishes and maintains system-defined schemas for representing common types widely used in ML workflows. How can I find all the supported system schemas in my own Vertex MetadataStore.
System defined schema are maintained by Vertex services and will also be updated when new schemas are added to the system. Those schemas are managed under namespace "system" and "google". To find all currently supported system defined schemas in a given store, one can follow the instructions listed in https://cloud.google.com/vertex-ai/docs/ml-metadata/system-schemas#list_your_schemas.

ApolloGraphQL implement Shared Schema across a federated GraphQL service

I'm currently following a tutorial that composes multiple subgraphs into a supergraph, which is great for separation of concerns. What I'm wondering is it possible to have multiple subgraphs split out contributing data to a shared schema.
So for example, within the tutorial
Gateway. Composed of Products subgraph, locations subgraph, reviews subgraph.
What I'd like to achieve, wondering whether its even possible.
Gateway, Composed of Products from one API, along with products from another API, along with products from another API
i.e, different micro services building the data, but a shared common data model for products used across them.
Within the docs I'm reading at present "By default, exactly one subgraph is responsible for resolving each field in your supergraph schema" - which suggests that it is possible? But at this point I'm not entirely sure, or even if graphQL is the right technology solution for my problem.

neo4j resultSet to JSON node and edge lists

I'm struggling with this problem in days, there is an easy way to covert a result of a neo4j query in Spring Data Neo4j (types Iterable<Map<String, String>> or Iterable<Map<String, Object>>, I guess) in a plain JSON list of nodes and edges for the visualization in a browser using a javascript library?
It looks so dumb as question, and yet I find nothing about it..
I tried to fits this code to my data model, https://github.com/jexp/sdn-boot-example/blob/master/src/main/java/movies/spring/data/neo4j/services/MovieService.java but that code is domain specific.
Since I have multiple node entities and multiple relationship entities, it would be crazy write a class ad-hoc each combination of node and edge.
The only thing so far it works is reformat the data clientside, which I don't like that much.

what are the steps to implement neo4j, gremlin for codeigniter user

I need to migrate from RDBMS to GRAPH and decide to implement neo4j with gremlin. But I only have PHP as a server side language. What are the steps to implement neo4j (and gremlin?) in codeigniter environment. May be this question is too general but I'm sure many people have the same problem like me.
In general, (not sure about PHP frameworks), you will want to do the following process.
For all your "objects tables," loop through the rows and create a respective vertex. For the columns of those rows (e.g. id, name, age), add them as properties of the vertex. For instance, if you have a Person-table, then SELECT * FROM Person. Each row is a vertex with properties.
For all your "relational tables" (or that which is relational via join), loop through the rows and link your vertices. For instance SELECT personId, companyID FROM WorksFor. Each row is an edge that links a person vertex with a company vertex.
Adding vertices/edges via Gremlin is simple. The complicated aspect of your process, is the workflow you go through to create your mapping.
https://github.com/tinkerpop/gremlin/wiki/Updating-a-Graph
Finally, be sure to be smart about transaction handling so you don't blow your heap. You will want to commit your transaction every so often to have the data persisted to disk.
Not sure, but since Cypher http://docs.neo4j.org/chunked/snapshot/cypher-query-lang.html is the native Neo4j language and very SQL-like, that might be an easier option?
implementing this library should work in codeigniter too:
https://github.com/jadell/Neo4jPHP/wiki

Resources