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
19
questions
0
votes
0
answers
12
views
Use Spring GraphQL under Spring Cloud OpenFeign
I want to use GraphQL in Spring Cloud. Use NIO and GraphQL Features
Cloud OpenFeign will inevitably need to be used or adapted.
https://github.com/spring-projects/spring-graphql/tree/main/samples/...
0
votes
0
answers
18
views
(Spring-Webflux & graphql - JAVA) Subscriber unable to re-connect to Publisher, in case Publisher gets UP after being DOWN for some time
We have two applications, one is Subscriber (We will name it as Sub1) and Another is Publisher (We will name it as Pub1). I have written below code in Subscriber which tries to connect to an Endpoint ...
0
votes
0
answers
25
views
Spring GraphQL ignore auth for introspection query
I have a WebFilter that does some auth logic, write some context before calling chain.filter(exchange).
I'm using Spring GraphQL with GraphiQL enabled. I would like to skip auth for GraphiQL. As ...
0
votes
1
answer
53
views
Java List to Reactor Flux to Identity Map
I'm trying to implement some simple Spring Boot GraphQL BatchMapping.
The @BatchMapping receives a List<Book> and then calls a @Repository and transforms the result into a Map<Book, Author>...
1
vote
1
answer
23
views
spring-graphql upload file feature
first of all I want to congratulate the excellent work with the spring integration with graphql.
I would like to know if there is a roadmap to make uploading files available in the api
2
votes
1
answer
59
views
When will "Spring for GraphQL" be integrated in "Spring Boot 3"?
I know that Spring Boot 2.7 has an integration with Spring for GraphQL 1.0. However, I cannot find any information at which milestone of Spring Boot 3 the integration with GraphQL is scheduled. Any ...
0
votes
0
answers
22
views
GraphQL DataLoader for bidirectional Hibernate entities and the N+1 issue
I got these bidirectional entities:
@Getter
@Setter
@Entity
@Table(name = "category")
public class CategoryEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@...
0
votes
1
answer
106
views
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 ...
0
votes
1
answer
96
views
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";
...
0
votes
1
answer
151
views
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 {
...
1
vote
1
answer
110
views
how to register extended scalar
graphql beta testers,
experimenting with 1.0.0-M6 and wondering how I can register custom scalars from the widely used graphql-java-extended-scalars project.
I added
@Bean
public GraphQLScalarType ...
0
votes
1
answer
99
views
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 ...
0
votes
0
answers
21
views
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 ...
0
votes
0
answers
57
views
Suppress automatic injection of Locale instance (from DataFetchingEnvironment) in @SchemaMapping method
I am using Spring for GraphQL (version 2.7.0-M1).
My API returns Locale objects, with a type definition like
type Locale {
code: String!
title: String!
...
}
To create a DataFetcher for ...
0
votes
1
answer
165
views
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. ...
0
votes
0
answers
166
views
Spring GraphQL authentication error handling
I am using Spring GraphQL and Spring Security in my project. I am authenticating users with JWTs so I have a security filter to check the validity of the token. When the token is invalid, an exception ...
0
votes
1
answer
179
views
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 ...
0
votes
1
answer
71
views
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?
1
vote
1
answer
633
views
Spring GraphQL with WebMvc getting request headers
I have a Spring GraphQL project. Each data fetcher (@SchemaMapping) will get data from a remote API protected by authentication.
I need to propagate the authorization header from the original request (...