neo4j-graphql / neo4j-graphql-java

Neo4j Labs Project: Pure JVM translation for GraphQL queries and mutations to Neo4j's Cypher
Apache License 2.0
105 stars 49 forks source link

Apollo Federation Support #166

Open AkshayaKrishnaswamy opened 3 years ago

AkshayaKrishnaswamy commented 3 years ago

Hi ,

Neo4j-graphql-js provides the support for schema stitching via Apollo Federation .Do we have similar support in neo4j-graphql-java .

JS Code Snippet


export const inventorySchema =buildFederatedSchema([ makeAugmentedSchema({ typeDefs: gql ` extend type Product @key(fields: "upc listCompoundKey { id } objectCompoundKey { id } nullKey") { upc: String! @external weight: Int @external @requires(fields: "weight price") @cypher(${cypher CALL apoc.when($price > 900, 'RETURN 0 AS value', 'RETURN $weight * 0.5 AS value', { price: $price, weight: $weight }) YIELD value RETURN value.value }) }, config: { isFederated: true
} }) ]);


What is alternative to enable federation in neo4j-graphql-java? config: { isFederated: true }

Andy2003 commented 3 years ago

Schema federation will be not supported by the successor of the neo4j-graphql-js

Further Excluded Features

  1. Additional Labels
  2. GraphQL Architect
  3. Indexes and Constraints
  4. Inferring a Schema
  5. Federation Support - We found federation very specific to Apollo users & not beneficial for our greater audience

This said, in the current example you can see how to do schema stitching.

Can you elaborate on the exact use case? Do you want to couple the neo4j-graphql-java server via apollo-federation with other services?