Tag: spring-graphql
-
Injected dependencies of Controller are sometimes null when using @SchemaMapping
1 The bounty expires in 5 days. Answers to this question are eligible for a +100 reputation bounty. Benoit Cuvelier wants to draw more attention to this question. I have a problem on a SpringBoot (3.2.0) application that uses GraphQL with spring-boot-starter-graphql. I have several annotated controllers that contain some @SchemaMapping, @QueryMapping and @MutationMapping. For…
-
In graphql what is difference between a `type query` and `extend type query`?
0 In graphql what is difference between a type query and extend type query? Ex: difference between type Query { product(id: String!): Product } and extend type Query { DeviceDetail(devId: String!): DeviceDetail } Will appreciate if you could add an example for your explanation. graphql graphql-java spring-graphql netflix-dgs Share Improve this question Follow asked 1…
-
Support for multiple paths pointing to different graphql schema
0 I have two graphql schemas that we can say one as admin and one as internal and i need to map each with a separate graphql endpoint as:- Schema – admin.graphqls, internal.graphqls /graphql/admin and /graphql/internal however the exposed configuration property we have in spring-boot-starter-graphql is a string so possible only one endpoint can be…
-
Reconfigure dataloaders when migrating from graphql-java-kickstart to spring-graphql
0 I’m in the process of migrating a GraphQl-java-kickstart project to Spring-GraphQl, as Spring-GraphQl was not available at the time when GraphQL was implemented in the project. The main reason for migrating is that the auto-configuration and annotation based approach offered by Spring may help remove much of the complex boilerplate code in the initial…
-
How to implement union in spring-graphql. I get error that I’m requesting object but its rather a ‘graphql.schema.GraohQLUnionType’
0 I wanted to create a union named Tables, that holds all the other tables and the user can request the table accordingly. I get the error: You have asked for named object type ‘Tables’, but it’s not an object type but rather a ‘graphql.schema.GraohQLUnionType’ Here is my graphql schema: type Query{ getData: [Tables] }…
-
Spring Boot 3 Observability – collect GraphQL error metrics
0 I’ve been working on adding monitoring metrics in our GraphQL gateway recently. I have a Spring Boot project with the following dependencies: ‘org.springframework.boot’ version ‘3.1.5’ spring-boot-starter-graphql:3.0.1 spring-boot-starter-actuator spring-boot-starter-aop …[others not relevant]… So I have a GraphQL server that typically returns an HTTP 200 status code for all responses and in case of an issue…
-
Software Engineer-1
-1 Getting 404 not found error for /graphql endpoint.I have added configurations related to graphql ie. schema classpath, enabled graphql. I have added the required dependencies : "spring-boot-starter-graphql" and "graphql-java-tools". I have created a controller containing the @QueryMapping for querying data . I tried updating adding @Component on my Controller (saw in a post) but…
-
Spring for GraphQL: addressing over- and under- fetching by changing schema structure?
0 I’m using Spring for GraphQL and having trouble understanding how to make my graphql resolvers avoid over- and under- fetching without modifying my schema to reflect how data is grouped in my database. I’ve read about the N+1 problem but I think this is slightly different. Consider the following graphql schema: type Query {…
-
How to retry a Spring WebSocketGraphQlClient query
0 Using Spring Boot 3.2.4 with Spring WebFlux/GraphQL subscription via Websocket. Server A exposes a graphqlSubscription, and Server B consumes the subscription. They both use the same components (reactor/netty). Steps to Reproduce: // Client side, Initialize the webSocketGraphQlClient ReactorNettyWebSocketClient reactorNettyWebSocketClient = new ReactorNettyWebSocketClient(HttpClient.create(), build); WebSocketGraphQlClient.builder(serverUrl, reactorNettyWebSocketClient).build(); // Call sample webSocketGraphQlClient .document(query) .retrieveSubscription(path) .toEntity(XXXX.class) .retryWhen(Retry.fixedDelay(5, Duration.ofMinutes(1))).blockLast()…
-
Graphiql not working due of security – Spring for GraphQL
0 I’m trying to use graphiql UI but due of Spring Security, I receive 401. What’s the way to keep /graphql endpoint secured but let /graphiql request to graphql endpoint? I’m on Spring Boot 3.1.4 and Spring For Graphql 1.2.3 If I permitall /graphql it works but I loss security. I Tried also to put…