Questions tagged [spring-graphql]

Spring for GraphQL provides transport and an annotation model for exposing GraphQL APIs. It is supported with a dedicated Starter as of Spring Boot 2.7.0

87 questions
0
votes
1 answer

Spring-Boot GraphQL QueryResolver is not called

When I call a query in graphiQL i get the following response { "errors": [ { "message": "The field at path '/customers' was declared as a non null type, but the code involved in retrieving data has wrongly returned a null value. The…
0
votes
1 answer

Session handling error: Pool#acquire(Duration) has been pending for more than the configured timeout of 45000ms

I am using spring-boot-starter-graphql for simple client-server communication with websocket. Below is code snippet in client "ws://localhost:8080" +"/graphql"; WebSocketClient client = new ReactorNettyWebSocketClient(); …
0
votes
1 answer

Spring JPA and GraphQL

Given the following graph type Movie { name: String! actors: [Actor!]! } type Actor { name: String! awards: [Award!]! } type Award { name: String! date: String! } type Query { movies(): [Movie!]! } I'd like to be able to run…
vasily
  • 2,850
  • 1
  • 24
  • 40
0
votes
1 answer

GraphQL: how to avoid values overwrites for unspecified fields when doing an update via a mutation

Let me explain: I am using Gson as deserializer, MongoDB as storage and the newly Spring GraphQL Let's say I have an object O in database with the fields: A = 6 B = null If the frontend send an update on the B field so I receive a JSON with only…
0
votes
1 answer

Spring GraphQL projection throws no bean resolver exception

I have a Spring Boot application with Spring for GraphQL library and I need to modify the returned object. So I created and registered a projection class referring to my bean method: public interface MyEntityProjection { …
Ondřej Míchal
  • 573
  • 2
  • 5
  • 14
0
votes
1 answer

Custom serialization of specific return type for DataFetcher

I am using Spring for GraphQL (version 2.7.0-M1). In my domain model, a lot of properties return an object Foo. This object must be serialized to a String based on data available from GraphQlContext. So the schema looks like: type Parent { …
rmuller
  • 12,062
  • 4
  • 64
  • 92
0
votes
1 answer

Spring Boot graphiql not working when running a Jar but works on IntelliJ

I have a basic spring boot 2.7 project with graphql. I can access the /graphiql console from the path http://localhost:8080/graphiql?path=/graphql when running the project on intellij but I get 404 when running a jar file.
lizom
  • 41
  • 7
0
votes
1 answer

How to upload files using graphql-java on a netty server?

Most of the solutions I found on this topic use some kind of a servlet framework. How do we achieve this in a reactive app running on netty server?
stackMan10
  • 732
  • 6
  • 25
-1
votes
1 answer

SpringBoot3 SpringWeb and GraphQL throws No ContextAccessor for contextType: class reactor.util.context.Context

I am upgrading to SpringBoot3 (3.1.2). My app is a MVC with spring-boot-starter-web and spring-boot-starter-graphql on the path (Maven). When I call GraphQL (GraphiQL or Postman), I get an exception saying No ContextAccessor for contextType: class…
user2824203
  • 105
  • 11
-1
votes
2 answers

GraphQL error : Method not allowed error for GraphQL requests with Spring 3.1.1

I have upgraded spring boot to 3.1.1 and I am getting 405 method not allowed for graphql call. I tried all the known options. pom.xml org.springframework.boot
Abhishek
  • 9
  • 4
-1
votes
2 answers

Secure a Spring GraphQL API from traversal attacks

If I have a GraphQL API looking like this: type Query { userById (id: ID): User } type User { id: ID name: String secret: String supervisor: Supervisor } type Supervisor { id: ID name: String users: [User] } User X is logged in…
1 2 3 4 5
6