rkudryashov / graphql-java-federation Goto Github PK
View Code? Open in Web Editor NEWLibrary to adapt graphql-java services to Apollo Federation spec
License: MIT License
Library to adapt graphql-java services to Apollo Federation spec
License: MIT License
Service B:
type TypeB {
... // attributes of TypeB
}
type TypeA @key(fields: "id { uid }") @extends {
id: TypeAId ! @external
}
type TypeAId @extends {
uid: ID! @external
}
Service A:
type TypeA @key(fields: "id { uid }") {
id: TypeAId!
name: String
}
type TypeAId @key(fields: "uid"){
uid: ID!
externalIds: [TypeAIdExternalId] //other fields ..
}
with above schema in the , in a federated service -Service A. where the TypeA and TypeAId GraphQL type are defined when the Federated Entity Resolver tries to get an Object of TypeA with TypeAId , it is not able to resolve the ID types , since the ID types are only expected to be simple keys and a Key field of type id { uid } is not supported
In io.gqljf.federation.FederatedSchemaBuilder#getFederatedEntityId:
final String idValue = (String) representation.get(idFieldName); (Line 154)
The support needs to be added to lookup the Representation map for : id { uid } by lookup first by key "id" and then in a second level map by "uid"
My GraphQL Service follows the Global Object Identification Specification. We provide an interface called Node. That interface must include exactly one field, called id that returns a non‐null ID.
How does the library take care of implementing services resolving the Node interface and every concrete type that implements Node?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.