Tag: apollo-federation
-
GraphQL Federation where two services share data of a single shared schema
0 Really like the GraphQL Federation concept, where a gateway joins the data for clients. For example, imagine a library: Service A serves books from the library with title & ISBN property. Service B serves people, with a checkedOut list of books they have checked out, by ISBN. From what I can tell, though, there is…
-
Error from a non-sharable field defined in a subgraph that shoudn’t have this field
1 I have multiple GraphQL microservices (subgraphs, using ApolloFederationDriver) with a GraphQL gateway (using ApolloGatewayDriver) I have a really strange bug since I’ve upgraded my GraphQL microservices and gateway to use @apollo/server (@nestjs/graphql@11 + @nestjs/apollo@11) : I have an error when my subgraphs are composed telling me that subgraph A has a non shareable field…
-
How to apply alias in @key field in apollo federation
0 type oPlayer @key(fields: "id") @key(fields: "name"){ id:ID name: String } extend type oPlayer @key(fields: "name") @key(fields: "PlayerId") { name: String @external PlayerId: ID @external } I am tring to resolve that field using PlayerId field with id but I am not able get data in referance resolver How to provide alias to "PlayerId:id" so…
-
Mutation validation ids in input for entities from another service. GraphQL Apollo Federation
0 I need to validate ids from mutation There’s example type Query @extends{ calendars( users: [Int] resources: [Int] workgraph_types: [Int] provide_services: Boolean date_from: String date_to: String paging: PagingInput ): CalendarList! @verifyResource } Need to validate ids for resources. I have resource in another microservice. I need to check that resource exists in another microservice. I…
-
Graphql Inner and Left Join
1 We are using Apollo Router + Netflix DGS to build federated graphql services. Suppose that we have a common relational database right now for books and authors, but want to move towards a microservice architecture, where books and authors are stored separately in their own database. Suppose that I have the following graphql schema:…
-
Importing “@authenticated” directive using nestjs, apollo, and code-first approach
0 I am using NestJS server with microservices and Apollo Router. I want to add "@authenticated" directive to my resolvers so I can omit authentication on requests to routes that do not require it. When using @Directive("@authenticated"), I get an error saying that I either have to use "@federation__authenticated" (which throws error saying it doesn’t…
-
Does GraphQL introspection work on a federated system?
0 If I have a federated GraphQL solution, where each subgraph has ownership over their own schema and resolvers, would I be able to use GraphQL introspection to query the shape of the data across all the schema? Or am I restricted to introspection on one subgraph at a time. Tried looking for more information…
-
Extend shareable object in Apollo GraphQL Federation v2
0 Hi guys I have a question, I can’t solve this: I have a shared object between multiple subgraphs. In one subgraph I need to add 2 more fields to this shared object. I tried using "extend" but it’s not working, rover is giving me error when composing. I tried this schema1.graphql type GenericResponse @shareable…
-
Add appsync as subgraph to apollo graphql supergraph
0 I have apollo supergraph created with two subgraphs working perfectly. I have used Rover commands to join subgraphs with supergraph. Now I’m trying to add appsync as a subgraph to my supergraph. I have changed in the appsync schema as required apollo. Using rover command i have joined appsync as subgraph. I’m able to…
-
Dataloader is using only recent context
0 I have defined a custom context as below @Component public class MyContextBuilder implements DgsCustomContextBuilder<MyContexttBuilder.MyContext> { @Override public MyContext build() { return new MyContext(); } public static class MyContext { private String customState = "Custom CID!"; public String getCustomState() { return customState; } public void setCustomState(String state) { customState = state; } } } Datafetcher…