Questions tagged [graphql-spqr-spring-boot-starter]
20 questions
4
votes
0 answers
How to stop graphql-spqr-spring-boot-starter from printing logs in case of exception?
Could someone please help me on how to avoid printing stack trace in graphql in case exception happens (e.g. sending invalid id to find a record or creating a record without sending a mandatory field)?
I'm using graphql-spqr-spring-boot-starter and…

Anita
- 131
- 1
- 6
3
votes
1 answer
How can we get HttpServletRequest(DefaultGlobalContext) for GraphQL from RequestContextHolder for GraphQL (using graphql-spqr-spring-boot-starter)?
I'm using graphql-spqr-spring-boot-starter library to migrate the existing Rest API project to GraphQL. I have a below piece of code to fetch the current HttpServletRequest from RequestContextHolder for Rest API:
HttpServletRequest request =…

Anita
- 131
- 1
- 6
2
votes
1 answer
JWT Authentication graphql-spqr with spring security
I am using graphql-spqr-spring-boot-starter, version 0.0.5 in my spring boot application.
@GraphQLApi & @GraphQLQuery working fine and I am fetching data on /gui as well.
But as many have faced I am trying to apply the authentication part on graphql…

Talha DX
- 33
- 2
2
votes
1 answer
How to get a schema file in graphql using spqr-spring-boot-starter?
Could anyone please help me how to get a schema file using spqr-spring-boot-starter?
I looked for the solutions online and found this: How to get the generated scheme file .graphqls using SPQR?
new SchemaPrinter(
// Tweak the…

Anita
- 131
- 1
- 6
2
votes
1 answer
Unable to get rid of 'Exception while fetching data(/{apiName})' in graphql-spqr-spring-boot-starter
I’m using ‘graphql-spqr-spring-boot-starter’ library version 0.0.4 of ‘io.leangen.graphql’. I'm able to customize errors. See the below code and screenshot for reference:
Models:
@Getter
@Setter
@ToString
@Entity
@Accessors
public class Student {
…

Anita
- 131
- 1
- 6
1
vote
0 answers
Create a graphql api in Java which streams an arrowflight stream
I need to create a graphql api which streams an arrowflight stream. I'm unable to find any documentation which can help me figure out a way to do this in Java. Below is the sample code I have:
String query = String.format(
"SELECT %s…

ekta mantri
- 11
- 1
1
vote
1 answer
How to handle identity fields in GraphQL SPQR
Let's say I have
@Id @GeneratedValue(strategy=GenerationType.IDENTITY)
@Column(name="trade_id")
int tradeId;
When I query this from the database, I will want to get the tradeId. However, when performing a Create, obviously I won't have the…

Steve
- 4,457
- 12
- 48
- 89
1
vote
1 answer
graphql-java SPQR: how to use @GraphQLUnion annotation?
I inherited a project using GraphQL in Java with Grapqhl-SPQR spring boot starter package (v 0.0.3). It uses annotations to autogenerate the GraphQL SDL, but I need to improve error handling. From what I have found online, I need to implement a…

Sam
- 571
- 1
- 6
- 18
1
vote
3 answers
how to Disable Schema Introspection in graphql-spqr-spring-boot-starter
I have integrated my spring boot application with graphql-spqr-spring-boot-starter https://github.com/leangen/graphql-spqr-spring-boot-starter , I need to find a way on how to disable graphql schema introspection since its a security issue for…

vishal sundararajan
- 117
- 2
- 15
1
vote
1 answer
Why am I getting a warning related to 'type name collision' using graphql-spqr-spring-boot-starter?
Could someone please help me here, I'm getting a warning something related to 'type name collision' as follows. I'm using graphql-spqr-spring-boot-starter.
2020-06-06 19:04:15.972 WARN 22428 --- [ main]…

Anita
- 131
- 1
- 6
1
vote
0 answers
Is GraphQL-SPQR library production-ready?
I'm working on an existing REST API project and trying to migrate it to GraphQL using graphql-spqr library. Can someone please help me with whether this library is production-ready? Has anyone used spqr library in their product?
Thanks in advance!

Anita
- 131
- 1
- 6
1
vote
2 answers
graphql-spqr with Spring Boot and Transactional Boundary
We are using graphql-spqr and graphql-spqr-spring-boot-starter for a new project (With Spring DataJPA, hibernate and so on).
We have a mutation like this:
@Transactional
@GraphQLMutation
public Match createMatch(@NotNull @Valid MatchForm matchForm)…

Janning Vygen
- 8,877
- 9
- 71
- 102
0
votes
0 answers
How to use @GraphQLInterface in SPQR
I want to return list of interfaces with different implementations by calling query/mutation in grpahql spqr.
For this purpose I suppose I need to use @GraphQLInterface.
Maybe I doing something wrong, but it not works.
I have spring-boot app…

Saimon White
- 1
- 2
0
votes
1 answer
Graphql SPQR how to represent undefined fields
So I was reading this
https://github.com/leangen/graphql-spqr/issues/197
and we have
mutation createUser {
createUser(name: "Test", address: null) {
...
}
}
defined with this code
@GraphQLMutation
public User createUser(String name,…

Steve
- 4,457
- 12
- 48
- 89
0
votes
1 answer
How to treat a child class like its parent in GraphQL SPQR
I created a wrapper around BigDecimal. Basically just putting a bunch of friendlier methods on top of it. I use it for some of my POJO's fields, and it generates a schema like this
# Built-in java.math.BigDecimal
scalar BigDecimal
input…

Steve
- 4,457
- 12
- 48
- 89