Questions tagged [graphql-java]
graphql-java is a Java implementation for GraphQL, a query language created by Facebook for describing data requirements on complex application data models.
graphql-java
620
questions
1
vote
0
answers
19
views
Spring Boot Graphql Subscription with graphql-ws protocol
I'm trying to write a graphql client using the spring-boot-starter-graphql library.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-...
0
votes
0
answers
8
views
How to include fields with null values in Netflix DGS Graphql response
We are using NetflixDGS with spring-boot to implement rest API. Say my API response has to return below object
{
"name": "Abc",
"age": "25",
"place": ...
1
vote
0
answers
25
views
How to properly perform dynamic filtering using graphql-java?
Assume that using the schema below, both the teams query and the members collection (from the Team type) are bound to data served by different services using BatchLoaders. Also, let's assume that ...
-1
votes
1
answer
41
views
Spring GraphQL with Spring 5
I'm trying to create a java graphQL client for my app that will consume a graphql endpoint (example : https://countries.trevorblades.com/).
My app uses Spring framework 5 (it's not spring-boot app).
...
0
votes
1
answer
21
views
Schema transformation per-request on Spring GraphQL
We are migrating from using the spring graphql kickstarter to the official Spring for GraphQL solution.
Something the kickstarter had was a Servlet that could be overridden to get the schema per ...
0
votes
0
answers
14
views
How to resolve graphql relationship error
After updating my project, when I tried amplify push I got the error below
Song must have a relationship with Post in order to use @belongsTo. from my graphql schema code.
What can I add to create the ...
1
vote
0
answers
41
views
Custom Directive on Input type GraphQL DGS
I am trying to create a custom directive that do some transform/validation on input type in GraphQL DGS in Java Spring Boot
Here is how I declare my custom directive
directive @trim on ...
1
vote
1
answer
34
views
Default strategy for discovering data fetchers in spring for graphql?
After reading the docs for Spring for GraphQL, I understand how to annotate methods and controllers to expose data fetchers for items in my schema. My question is.. do I need to do that for every ...
0
votes
0
answers
13
views
GraphQL schema documentation based on SPQR and JSR 303 annotations
I'm using the SPQR Spring Boot for GraphQL. My requirement is that if I have JSR-303/380 annotations in the POJO classes, it should be added as comments in the generated schema. Is there any mechanism ...
0
votes
1
answer
94
views
How to use variables in graphql query via dgs java graphql client?
I am using dgs java graphql client in my code. I want to build a query and specify variables in the query, I want to get something like this::
{
"query": "query ExampleQuery($first: ...
0
votes
1
answer
21
views
GraphQL - Java RestTemplate
We are facing the odd issue in graphQL which is used in NexarAPI. For me, it is working fine while sending setting basic query
{ "query": "query Categories { supCategories { id name ...
0
votes
1
answer
22
views
Can I encode ID type as base64 with spring-graphql?
How can I encode the ID type as base64 in spring-graphql? note: I'm looking for a way to do it automatically for any field that the schema defines as ID, not writing this by hand in every controller ...
0
votes
1
answer
46
views
run query for multiple variables
My requirement is to run a query with multiple variables.
type Record {
asset(count: String!, lang: String!): Cat!
}
query ($count: String!, $lang: Str!) {
asset(coun: $count, lang: $lang) {
...
0
votes
0
answers
26
views
how to make request to Shopify Admin API in graphql with java generated classes
I need help to understand how to make request to Shopify Admin API in graphql with java generated classes. I used this tool : https://github.com/Shopify/graphql_java_gen to generate the classes but I ...
0
votes
0
answers
30
views
How to use GraphQL to retrieve only one field based on compound query
I am working with the Graphiql at https://data.rcsb.org/graphql/index.html?query=%7B%0A%20%20polymer_entity_instances(instance_ids%3A%20%5B%221S0H.A%22%5D)%0A%20%20%7B%0A%20%20%20%20rcsb_id%0A%0A%20%...