142 questions
1
vote
1
answer
69
views
How to make a graphql request for persisted queries using HttpGraphQlClient in spring graphql?
I have spring boot graphql server side and spring graphql client side applications. The client graphql queries are persisted in graphql-server-side. Now from the graphql-client-side application, how ...
1
vote
1
answer
110
views
How to sort @GraphQlRepository paginated results
I’m currently evaluating the potential use of Spring Boot GraphQL for future web projects. So far, I’ve had positive experiences with filtering, pagination, and selects/joins. However, I haven’t found ...
0
votes
0
answers
82
views
Spring GraphQL Controller cannot see Spring Service
I had a perfectly working Spring Boot application with Java 21. The problem is when I now try to add GraphQL to the mix. The GraphQL libraries are in the pom.xml and that includes the Spring GraphQL ...
1
vote
1
answer
109
views
Multiple queries in single request using DgsGraphQlClient
Is there a way to send multiple queries(netflix dgs generated query and projection DTO's) using the DgsGraphQlClient wrapper class? For example, I have below schema:
type Query {
books: [Book]
...
3
votes
2
answers
630
views
GraphiQL over Springboot shows React errors and blank page
I work on a Kotlin Spring API. It is running inside a Docker container from eclipse-temurin:17-jdktrough image on WSL 2 Ubuntu 22.04 LTS (Host is Windows 11 Entreprise 24H2).
Project dependencies ...
0
votes
0
answers
43
views
Does graphql controller in springboot require a no args constructor for input DTO?
I'm working on a spring boot graphql project where my mutation takes a complex input type. My BookInput is an interface and I get a concrete implementation at run time like BookInputImpl ( We can ...
0
votes
1
answer
71
views
Automatically enforcing GraphQL directives with Spring GraphQL
I wondering if it is possible to automatically enforce GraphQL directive in Spring GraphQL.
My schema is
directive @validateUserId on ARGUMENT_DEFINITION
type Mutation {
addBook(userId: ID! @...
1
vote
1
answer
81
views
HttpGraphQlTester doesn't work with ArgumentValue
I'm having a mutation defined to update an image object:
mutation updateImage($input: UpdateImageInput!) {
updateImage(input: $input) {
...Image
}
}
The UpdateImageInput looks like ...
1
vote
1
answer
405
views
How to deal with input arguments as part of a @BatchMapping in spring boot GraphQL
Given a GraphQL schema that contains data like the following
type Person {
name: String!
age: Int!
friends(filter: FriendsFilter): [Person!]!
hobbies(filter: HobbiesFilter): [Hobby!]!
}
I can ...
0
votes
1
answer
48
views
Custom GraphQLSchema with CodeRegistry DataFetchers Lost When Converting to SDL in Spring Boot
I'm building a GraphQL API using GraphQL Java and Spring Boot. I create my GraphQLSchema programmatically, including a custom GraphQLCodeRegistry that registers my data fetchers. For example, I build ...
0
votes
2
answers
141
views
Can I increase a timeout on spring GraphQlTester execute?
I have mutation request like this:
public static final String CREATE_DT_MUTATION = """
mutation($dt: CreateDTInput,$file: Upload!) {
createDT(dt: $dt,...
2
votes
1
answer
135
views
How to use multiple graphqls files?
I'm trying to build a GraphQL application, and my current schema files are located at the following paths:
schema/book/book.graphqls,
schema/infra/infra.graphqls
Right now In my properties file, I ...
1
vote
1
answer
84
views
Spring WebFlux with Reactive HttpServiceProxy requests results in No converter found capable of converting from type
I've come across a very interesting issue, where I have the following service:
import io.github.thibaultmeyer.cuid.CUID
import kotlinx.coroutines.flow.Flow
import org.springframework.web.bind....
0
votes
1
answer
107
views
Testing a custom reactive WebGraphQlInterceptor with Netlfix DGS
I have a working WebGraphQLInterceptor that does some authorization checks based on a combination of authentication and GraphQL query parameters.
I want to write unit tests that test my ...
0
votes
0
answers
252
views
How to implement pagination for spring boot, graphql with mongoDB as backend?
Assume I have the graphql defined with
type Query {
book(id: ID!): Book
books(first: Int, last: Int, before: String, after: String): BookConnection
}
type Book {
id: ID!
name: String!
}
How ...