Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
53 views

Exposing Graphql introspection with Spring (Boot) Security

I have a pretty standard Spring Boot application that I just started with Spring Security using JWT. I've added in the spring boot start GraphQL support (which I've done on a non-secured app in the ...
Gregg's user avatar
  • 35.7k
2 votes
1 answer
64 views

Spring Boot Graphql Subscription with graphql-ws protocol

I'm trying to write a graphql client using the spring-boot-starter-graphql library. <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-...
altindalorcun's user avatar
0 votes
1 answer
26 views

Modify ClassPath for ResourceDocumentSource

I have a Java 21 Spring Boot 3.3.1 application. It is an MVC app. The application sends out several different GraphQL requests, and I currently have the template files located in: src |- main |- ...
Ebad's user avatar
  • 293
0 votes
2 answers
114 views

Is it possible to expose multiple GraphQL endpoints in one spring boot application?

Does Spring support exposing multiple GraphQL endpoints and having separate schemas for those endpoints? I found nothing about it in the documentation. I know that Spring supports multiple schemas, ...
user7963071's user avatar
0 votes
1 answer
64 views

Java 21 Spring Boot 3.3.1 How to get GraphQlTester to use main/resources/graphql-documents/

I have a Java 21 Spring Boot 3.3.1 application. I have several GraphQL APIs, and I also need to send several GraphQL requests to other services. I also have GraphQlTester tests. However, I have ...
Ebad's user avatar
  • 293
1 vote
0 answers
85 views

Error 400 [no body] when trying to send a GraphQL Request with HttpSyncGraphQlClient in Spring Boot 3.3.1

I have a Java 21 Spring Boot 3.3.1 using MVC application. I used to send GraphQL requests with RestClient and just built the GraphQL body manually. Since I am using MVC, I could not use the ...
Ebad's user avatar
  • 293
-1 votes
1 answer
68 views

Spring GraphQL with Spring 5

I'm trying to create a java graphQL client for my app that will consume a graphql endpoint (example : https://countries.trevorblades.com/). My app uses Spring framework 5 (it's not spring-boot app). ...
LBOSS's user avatar
  • 132
0 votes
0 answers
55 views

Spring Data Neo4j Graphql Integration: query with depth > 1 not working

I can not get SDN working with Graphql repositories. If there is a Node hierachy with depth > 1 the respective entities are not queried correctly as demonstrated here: https://github.com/NilsWild/...
Ceryni's user avatar
  • 431
0 votes
1 answer
27 views

Schema transformation per-request on Spring GraphQL

We are migrating from using the spring graphql kickstarter to the official Spring for GraphQL solution. Something the kickstarter had was a Servlet that could be overridden to get the schema per ...
Justin Sumida's user avatar
0 votes
1 answer
32 views

Accessing response headers in SyncGraphQlClientInterceptor

This question was originally asked on github issues. Posted here in hopes of getting an answer. Please tell me is it possible to somehow get information about response headers in ...
morohon's user avatar
  • 45
1 vote
1 answer
70 views

Default strategy for discovering data fetchers in spring for graphql?

After reading the docs for Spring for GraphQL, I understand how to annotate methods and controllers to expose data fetchers for items in my schema. My question is.. do I need to do that for every ...
Justin Sumida's user avatar
1 vote
1 answer
80 views

How to use Spring GraphQL in an existing server

I have an existing application running in a non-Spring application server. I'd like to integrate a GraphQL API into that application using spring-graphql. How would I go about that? My intention was ...
bjlevine's user avatar
  • 982
0 votes
1 answer
21 views

How to obtain a reference to the configured ExecutionGraphQlService

I have a spring-graphql project configured using Spring Boot using Spring MVC to handle GraphQL queries over HTTP. I also want to execute GraphQL queries on the server side. How would I get a ...
bjlevine's user avatar
  • 982
1 vote
1 answer
68 views

How to exclude a nullable field in Graphql response

I am developing a graphql service which return some response elements. In my graphql schema I have defined non-nullabale and few nullable fields. My expectation is if any nullable field is null as ...
springbootlearner's user avatar
0 votes
1 answer
28 views

Can I encode ID type as base64 with spring-graphql?

How can I encode the ID type as base64 in spring-graphql? note: I'm looking for a way to do it automatically for any field that the schema defines as ID, not writing this by hand in every controller ...
xenoterracide's user avatar
0 votes
1 answer
91 views

Is there a good way to BatchMapping or use Data Loaders in Spring GraphQL utilising non-exposed fields?

Consider the below minimal GQL schema: type query { appointments: [Appointment!]! } type Appointment { id: ID! job: Job! } type Company { id: ID! job: Job! } type Job { id: ...
Alexios's user avatar
  • 123
1 vote
1 answer
141 views

GraphQL Schema Error: Missing query Operation

I'm working on Spring boot GraphQL project and im encountering an error while defining my GraphQL schema. It states: Caused by: graphql.schema.idl.errors.SchemaProblem: errors=[A schema MUST have a '...
Thilak Sparrow's user avatar
1 vote
0 answers
50 views

How to do different operations besides equals with Spring GraphQL, Spring Data, and QueryDSL

I'm trying to understand how Spring GraphQL handles more complex QueryDSL queries internally but I am struggling to find good documentation or examples of use cases such as doing range queries or like ...
Anthony Lofton's user avatar
0 votes
2 answers
90 views

Does Spring for GraphQL prefer WebFlux more than Web?

Many tutorials on the web seems to use Webflux than Web to build using Spring for GraphQL. Does this mean the library is more tested/stable with Webflux than that of Web? Thank you!
hinewwiner's user avatar
0 votes
1 answer
64 views

How to set HttpServletRequest headers when unit testing with GraphQlTester in kotlin?

I'm working on a Spring Boot project using Kotlin and GraphQL. For unit testing, I'm using GraphQlTester from org.springframework.graphql.test.tester.GraphQlTester. I need to pass headers to the ...
chathura's user avatar
-1 votes
1 answer
176 views

Trouble Accessing localhost:8080/graphiql

I am currently building a basic REST API application using Java and SpringBoot. I updated my application.properties file and pom.xml to allow the integration of graphiql/graphql. When I try running my ...
walt936's user avatar
  • 33
0 votes
1 answer
98 views

Java Spring Boot GraphQL WebSocket closes immediately after opening

I am trying to set up a WebSocket handler for my Java 21 Spring Boot 3.2 application. It is an MVC application and the WebSocket must handle the sub-protocol graphql-ws. I am using Postman to connect ...
Ebad's user avatar
  • 293
0 votes
1 answer
103 views

Spring Data R2DBC: Saving Department with Empty Employee List (Unsupported array type)

I'm encountering an error while saving a Department object with Spring Data R2DBC. My Department model has an employees property that can hold a list of Employee objects. However, when I try to create ...
Thilak Sparrow's user avatar
0 votes
1 answer
158 views

Graphql requests not served by graphql but by general spring rest

My spring boot application exposes both rest and graphql endpoints for different set of apis. Rest endpoints are working fine but graphql requests are also considered as rest and throwing 404 as it ...
Priya Mounica's user avatar
0 votes
0 answers
106 views

Springboot graphql controller with Webflux

I have a graphql controller in a reactive application using Webflux. The graphql controller is working fine, but I need to add standard cursor pagination as indicated here: https://graphql.org/learn/...
CptWasp's user avatar
  • 482
0 votes
0 answers
108 views

GraphQL Mutation with Same input and Type object using Spring for graphQL

I had a problem with Spring for GraphQL, I was trying to add a book to an existing static list of book using mutation. How to achieve it ? If my schema is, type Mutation { addBook(book: Book): Book ...
Manab Chatterjee's user avatar
0 votes
2 answers
158 views

Control not passing to Controller Advice class

I am using Spring Webflux (3.2.2) and Spring Graphql(3.2.2) . I have implemented a WebGraphQlInterceptor which looks for a request header. If its not found , I am throwing a Custom Exception . I have ...
Ladu anand's user avatar
0 votes
2 answers
270 views

How to access HttpServletRequest from Spring for Graphql WebGraphQlInterceptor

I am working on moving to Spring for GraphQL from kickstarter. And we used a custom Context in kickstart implementing GraphQLKickstartContext. However, this is not supported in Spring for GraphQl and ...
Mohamed Ayman Naguib's user avatar
0 votes
0 answers
173 views

Spring boot jpa + Redshift - pagination throws query syntax error

I am using creating a service in Spring boot Graphql, where I am using JPA to contact Redshift database. Regular queries run fine. However when I introduce pagination then I get query syntax error ...
Shades88's user avatar
  • 8,280
0 votes
0 answers
194 views

Spring Securit + Graphql ( Spring 3.2.2)

I am using spring for both security and graphql, First I want to quote this from spring graphql documentation 'The path to a Web GraphQL endpoint can be secured with HTTP URL security to ensure that ...
Ed .d's user avatar
  • 23
0 votes
1 answer
214 views

Spring Controller vs RestController GraphQL

I have the following question: why are the GraphQL Controllers not annotated as a RestController in the spring? I followed the official guide from spring and only the Controllers annotation is used. ...
Spongi's user avatar
  • 539
3 votes
0 answers
513 views

How to set up multiple GraphQL endpoints with Java Spring Boot

I am using Java 21 with Spring Boot 3.2 and the implementation "org.springframework.boot:spring-boot-starter-graphql:3.2.0" implementation of GraphQL. I am currently able to send requests to ...
Ebad's user avatar
  • 293
1 vote
1 answer
318 views

Spring GraphQL and org.springframework.data.domain.Sort as controller method argument

While implementing pagination & reading spring for graphql documentation, I came across the following There is built-in support for Spring Data’s Sort as a controller method argument. For this to ...
Andy's user avatar
  • 147
1 vote
2 answers
294 views

GraphIQL introspection schema call v/s query, mutation calls

I am using Spring Boot 3.2.0 with Spring GraphQL to build a simple CRUD application. I provided the query, mutation and GraphQL types to perfrom CRUD on database. In my application /graphql endpoint ...
Andy's user avatar
  • 147
0 votes
1 answer
246 views

Spring Boot GraphQL Subscription: A filter or servlet in the current chain does not support asynchronous operations

I am encountering an issue with a Spring Boot GraphQL application that uses subscriptions. When attempting to hit the endpoint, I am receiving the following error: java.lang.IllegalStateException: A ...
Ajit Barik's user avatar
0 votes
0 answers
95 views

How to stitch different schemas to different endpoints in spring graphql?

I have a problem similar to this. I want to have multiple schemas and expose them over separate endpoints. I tried the method suggested in the answer posted above, which is registering different ...
Aayush Shrivastav's user avatar
0 votes
1 answer
108 views

How to write integration test using graphqlTestTemplate for a mutation with one input and a file of Upload type

here is my mutation saveDoc(docInput: DocInput!, fileUpload: Upload!): Doc below is what i am trying String query = "saveDoc.graphql"; ObjectNode variables = mapper.createObjectNode(); ...
neo's user avatar
  • 41
0 votes
1 answer
537 views

Spring-GraphQL: Refer to schema.graphqls definition located in separate JAR

The Spring-GraphQL service I am working on requires a schema.graphqls file to be present at runtime. The spring-graphql documentation describes a default location where the schema can be resolved: By ...
Michiel's user avatar
  • 3,294
1 vote
1 answer
310 views

Getting syntax error on Mono.onErrorResume() while using a HttpGraphQLClient

I am using java 17, spring-boot: 3.0.5 and maven in my project. I am calling a GraphQL endpoint using HttpGraphQlClient. Below is my expected code snippet: Mono<Entity> entity = this....
Alisha Raju's user avatar
4 votes
1 answer
217 views

Injected dependencies of Controller are sometimes null when using @SchemaMapping

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 @...
Benoit Cuvelier's user avatar
0 votes
1 answer
229 views

In graphql what is difference between a `type query` and `extend type query`?

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: ...
cbot's user avatar
  • 143
0 votes
0 answers
280 views

Support for multiple paths pointing to different graphql schema

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 /...
KB Prodigy's user avatar
2 votes
1 answer
449 views

Reconfigure dataloaders when migrating from graphql-java-kickstart to spring-graphql

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 ...
Michiel's user avatar
  • 3,294
0 votes
1 answer
651 views

How to implement union in spring-graphql? I get error that I'm requesting object but its rather a 'graphql.schema.GraphQLUnionType'

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 ...
SwimmingHigh's user avatar
2 votes
1 answer
178 views

Spring GraphQL - DataFetcher observations-missing keys

I am trying to monitor a Spring Boot GraphQL application using Spring Boot 3 Observability features. I managed to do well the monitoring for succesfull requests and now I am trying to collect some ...
Mars's user avatar
  • 137
0 votes
1 answer
86 views

Support for HTTP-Get extensions like persisted queries missing?

This is somewhere in between a feature a request and a possibly already answered question (which I haven't found, sorry in that case). I'm currently migrating from graphl-java-spring to spring-graphql ...
Wolfgang Schröder's user avatar
0 votes
1 answer
1k views

How can I intercept graphql queries?

I am using spring-boot-graphql-starter in my project. How can I add this interceptor to the graphql queries? This is how I configure the interceptor. However the context value is not filled in the ...
Mejmo's user avatar
  • 2,543
0 votes
1 answer
101 views

Spring Boot Starter GraphQL LazyInitializationException

I am currently implementing GraphQL into a system and am using Spring Boot 3.0.5 together with org.springframework.boot:spring-boot-starter-graphql to implement GraphQL schemas and queries. However ...
purzel's user avatar
  • 177
1 vote
1 answer
2k views

How to load GraphQL query file and call GraphQL API in Spring Boot

I have a spring boot microservice which uses Netflix DGS GraphQL framework which calls multiple backends/micro services. Most of the backend services are graphQL. For my orchestration I need to load ...
springbootlearner's user avatar
0 votes
0 answers
99 views

Spring graphql Connection in a custom mongo reactive repository that uses Aggregation

I am currently working on a sample project, and I am using the following stack Spring boot 3.1.4 spring-boot-starter-data-mongodb-reactive spring-boot-starter-graphql spring-boot-starter-webflux ...
Salvador Lopez's user avatar