Questions tagged [netflix-dgs]
75 questions
4
votes
1 answer
Getting error while using latest Netflix DGS bom in Springboot
I am trying out using the Netflix DGS library in Springboot, and have followed the documentation for getting started.
Current status is, if I am not including DGS as a dependency, application is working fine with Rest Controllers.
My aim is to build…

Arvind Singh Rawat
- 53
- 1
- 5
4
votes
2 answers
How to initialize a lazy loaded collection outside of the transaction it was fetched in the right way?
I've a spring boot application which uses Hibernate as an ORM and DGS framework as the graphql engine. I've been struggling with finding ways to initialize a lazy loaded collection, the proper way. I've the following…

Adil Waqar
- 41
- 2
3
votes
0 answers
How to authorize subscriptions with DGS and Spring Security
I am working on a Graphql API and want to authenticate and authorize Graphql requests. I have the setup working just fine for queries/mutations. However, with subscriptions I am running into some issues.
Versions
graphql-dgs-platform-dependencies:…

André
- 460
- 6
- 18
3
votes
0 answers
How to Expose 2 graphql endpoints using netflix dgs library with spring boot?
Is there a way to expose 2 graphql endpoints using spring boot netflix dgs library? As alternate, I have seen the post of using ServletRegistrationBean where we can define a GraphQLHttpServlet as a bean, and configure the context path to be…

KNathan
- 31
- 5
2
votes
0 answers
GitHub Actions: Gradle JavaExec with dependency from build output
I'm trying to run the main method of a class in my project as a Gradle task. The caveat is that this class has a dependency on a class that is generated by a different task(Netflix DGS generateJava)
It is my assumption that this should be as simple…

andresmonc
- 398
- 7
- 21
2
votes
0 answers
Server-side handling of non-nullable attributes in a DGS/GraphQL query
This is my first experience building a GraphQL API. My team is using Netflix DGS with Spring Boot on the backend side to implement this API. I found a situation that I am not sure what is the proper way to handle. Please see the code snippets…

Matheus Moreira
- 2,338
- 4
- 24
- 31
2
votes
0 answers
how to generate graphql files in a custom directory via netflix.graphql.dgs.codegen.gradle.GenerateJavaTask
in my gradle file I have
plugins {
...
id("com.netflix.dgs.codegen") version "5.5.0"
}
dependencies {
...
implementation("com.netflix.graphql.dgs.codegen:graphql-dgs-codegen-gradle:5.5.0")
…

DragonKnight
- 1,740
- 2
- 22
- 35
2
votes
1 answer
How to disable dgs-graphql framework controllers in swagger
I am using dgs-graphql and for REST Apis, I have configured the swagger (springdoc-open-api). When I am accessing the swagger ui, I am getting dgs-rest-schema-json-controller and dgs-rest-controller swaggers which are related to graphql.
How can I…

Susmitha
- 259
- 3
- 14
2
votes
1 answer
GraphQL netflix-dgs codegen generateJava imports java.util unnecessarily
I added the following type and enum to my schema.graphql
enum Currency {
USD
EUR
GBP
AUD
CAD
ILS
HKD
SEK
NZD
SGD
CHF
ZAR
BRL
CNY
INR
MYR
MXN
PKR
PHP
TWD
THB
TRY
…

Maxim Kolchinsky
- 21
- 3
2
votes
1 answer
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…

Davenporten
- 323
- 2
- 13
2
votes
1 answer
How to create a console application that uses NetFlix DGS Client
I want to use the excellent-looking DGS Framework from NetFlix to make client calls against a GraphQL service.
All the examples I find assume that I'm building a service and the Java GraphQL Client is introduced as something of an afterthought.
The…

NickBeaugié
- 720
- 9
- 17
2
votes
1 answer
How to avoid returning null in Apollo Federation GraphQL
I have two services (implemented using DGS Netflix) which I want to federate using apollo federation. First one is the user service which model looks something like this:
type User @key(fields: "sku") {
id: ID!
sku: Long
score:…

Zolcsak Tamas
- 147
- 1
- 8
2
votes
0 answers
Netflix DGS - Connecting generated class foreign-key mapping
I'm using Netflix DGS to wire up my data fetchers and loaders. So far I've been using my own entity classes with loaders and everything is working fine.
Relationship
Entity classes
My entity relationship is one-to-N as in above diagram. My Expense…

Mahendran
- 2,719
- 5
- 28
- 50
2
votes
1 answer
Netflix DGS with JPA
I have been playing around with the Netflix GraphQL framework DGS. Using the codegen plugin I can generate my model classes directly from the schema.
My question is how do I add persistance to these generated classes. Do I just add the annotations…

user3690467
- 3,049
- 6
- 27
- 54
2
votes
1 answer
how to get the header info in Netflix DGS resolver
We can write the query resolver layer as below
@DgsData(parentType = "Query", field = "answersByQuestionUuid")
public List answersByQuestionUuid(@InputArgument("questionUuid") UUID questionUuid,
…

USKMobility
- 5,721
- 2
- 27
- 34