I am using an Angular application with Graphql to communicate with a Java/Quarkus backend. There is a situation where a large object is generated and I am attempting to manipulate it in the backend. An error occurs: Invalid Syntax : More than 15000 parse tokens have been presented. To prevent Denial Of Service attacks, parsing has been cancelled. Smallrye-graphql and
Tag: graphql
GraphQL Scalar for java.time.LocalDate parses dates as StringValue
I try to parse a date, e.g. “2022-02-02” as java.time.LocalDate. Why the values passed to the scalar class are wrapped into curly braces? And how do I fix this? I configured the scalar for java.time.LocalDate: This is the query: The error says that Text ‘StringValue{value=’2018-09-03′}’ could not be parsed at index 0. I do not really understand why this is
How to define Nested enum type in GraphQL schema
I have an enum defined in graphql schema as below: But the WILDCARD query, can be further specified as STARTSWITH, ENDSWITH and CONTAINS, So can we achieve something like below while defining Schema or Answer There are no such nested enums in GraphQL schema. You can consider to model it using two separate fields with separate enums . And suppose
How to use Netflix DGS graphql-dgs-extended-scalars JSON scalar (java/spring-boot, maven)?
I ran into the issue where I wanted to use graphql-dgs-extended-scalars, specifically the JSON scalar, but had trouble finding a clear tutorial on how to do it. I’m sure they’re out there, but just in case someone finds themselves in the same situation as me hopefully my simple explanation below will save them some time. Answer Installation In pom file
GraphQL Input type declaration for Mutation
I’m new to GraphQL and after some coding I bumped into a problem with declaring an Input type for a Mutation. Here’s my Schema: When I run my app, I get the error Caused by: graphql.kickstart.tools.SchemaError: Expected type ‘IdInput’ to be a GraphQLInputType, but it wasn’t! Was a type only permitted for object types incorrectly used as an input type,
AWS Appsync Graphql Java Client – IAM authorisation
This is the schema for which I have implement business logic I use RestTemplate as my Java client to consume graphql endpoint giving API key as authorization. I ad dthe api key in the header paart as x-api-key. The above implementation retrieves the values from the backend. But according the schema which is defined by the other team, the authorization
How to query an API with graphql requests [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 12 months ago. Improve this question Currently I am using Postman with POST and GRAPHQL type queries. I wish I could query the API with spring-boot. First, I want to make
Get Original Field Name on GraphQL
I’m using https://github.com/leangen/graphql-spqr with spring-boot java application. I can reach to alias name easily but how can I reach to original fieldName? When I run this code, Output looks like with alias fields: “aliasNameX”, …, but I need original name like “originalName”. Is there a way to do it? Solved, according to: https://github.com/leangen/graphql-spqr/issues/381 Answer Posting my original answer here as
TypeMappingException: Multiple methods detected for operation “opName” with different return types
Working with graphql-spqr and Spring Boot, I’m trying to run the project but I run into this: and I got redirected to this for help : https://github.com/leangen/graphql-spqr/wiki/Errors#operation-with-multiple-resolver-methods-of-different-types I was not having multiple methods with the same name which triggers me, the URL in the exception is not helpful and can’t even be edited or commented. Answer Removing the protobuf Timestamp
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: This mutation works fine: I have ommitted the variables as they are not important. It does not work if I change it to: I get a LazyInitalizationException and I know why: The homeTeam is referenced by an