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
4
votes
1 answer

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 json() { return ExtendedScalars.Json; } in my…
D.Dinger
  • 61
  • 3
3
votes
0 answers

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 is thrown. I am trying to return the message of…
st.nasos
  • 31
  • 4
2
votes
0 answers

Asynchronous requests sometimes fail because the RequestFacade is recycled

I have the following view, which loads its data asynchronously: @Route(value = NewsAdminView.ROUTE) @RequiredArgsConstructor public class NewsAdminView extends VerticalLayout { public static final String ROUTE = ""; private final Grid
2
votes
1 answer

Does WireMock support Mocking GraphQL APIs

We have multiple micro services which is based on GrapQL and few of them based on REST and each micro service will call multiple other microservices (Java, Spring Boot tech stack). Now we want to write integration testing for this kind of…
2
votes
0 answers

Kotlin with Spring Native and Spring GraphQL - found 2 constructors for class

I'm trying to use Spring Native with Spring GraphQL. Problem When specifying @Argument with data class, an error occurs. (Note that even if UserListInput is a regular class (non-data class), the result is same) data class UserListInput( val…
2
votes
2 answers

Simple Spring GraphQL Subscription returning error

I'm trying to create a simple Spring GraphQL subscription handler. Here's my controller: @Controller public class GreetingController { @QueryMapping String sayHello() { return "Hello!"; } @SubscriptionMapping …
2
votes
1 answer

file schema.graphqls is not recognized as a grahql file

I'm trying to use graphql for the first time, and I have a problem with the schema.graphqls file, in fact the extension is not recognized even in my pom.xml I added the dependency :
sara
  • 21
  • 1
2
votes
1 answer

How to handle nested field with arguments in Spring for GraphQL @Controller

Using org.springframework.boot:spring-boot-starter-graphql and WebMvc, I would like to handle, in the @Controller, nested fields with arguments. E.g.: query myQuery { field1(param1: "value1") { field2(param2: "value2") { field3 } …
2
votes
1 answer

Spring Graphql - How to use a custom DataFetcherExceptionHandler and override the default one?

I'm new to spring graphql and I was trying to implement my own DataFetcherExceptionHandler so I can wrap all exceptions with my custom one. I've implemented my custom class that implements DataFetcherExceptionHandler but it seems like it still uses…
2
votes
1 answer

Spring GraphQL - how to map JSON extended scalar to POJO attribute?

I am implementing GraphQL API using Spring for GraphQL project and the GraphQL Java Extended Scalars project for handling JSON attributes since the data attribute I have is dynamic and its structure is not known by the server. This JSON attribute is…
djeison
  • 490
  • 2
  • 5
  • 20
2
votes
1 answer

Upload file feature for spring-graphql

Is there a roadmap to make uploading files available in the API?
2
votes
1 answer

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 hint is appreciated.
Juergen Zimmermann
  • 2,084
  • 7
  • 29
  • 43
2
votes
1 answer

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 (that I can see inside the @QueryMapping method)…
Ena
  • 3,481
  • 36
  • 34
2
votes
1 answer

Spring GraphQL schema creation workflow

I was looking into Spring GraphQL and I found out about the new annotation model for GraphQLControllers. I was wondering how the intended workflow for this new feature would look like regarding the creation of schema.grapqls files. Do I have to…
cgaisl
  • 21
  • 3
1
vote
0 answers

Using GraphQL SelectionSet to limit the columns fetched when using Spring Data JPA and QueryDSL

As per Spring for GraphQL documentation, "By default the Querydsl and the Query by Example integrations turn the GraphQL selection set into property path hints that the underlying Spring Data module uses to limit the selection." There are no…
Arun Chandrasekaran
  • 2,370
  • 2
  • 23
  • 33
1
2 3 4 5 6