diff --git a/graphql/graphql-dgs/pom.xml b/graphql/graphql-dgs/pom.xml
new file mode 100644
index 0000000000..1dc3630276
--- /dev/null
+++ b/graphql/graphql-dgs/pom.xml
@@ -0,0 +1,91 @@
+
+
+ 4.0.0
+ com.baeldung.graphql-dgs
+ graphql-dgs
+ 1.0
+ graphql-dgs
+
+
+ com.baeldung
+ parent-modules
+ 1.0.0-SNAPSHOT
+ ../..
+
+
+
+
+
+ com.netflix.graphql.dgs
+ graphql-dgs-platform-dependencies
+ 4.1.0
+ pom
+ import
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter
+ 2.6.2
+
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ 2.6.2
+ test
+
+
+
+ com.netflix.graphql.dgs.codegen
+ graphql-dgs-codegen-client-core
+ 5.1.14
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+ 2.6.2
+
+
+
+ com.netflix.graphql.dgs
+ graphql-dgs-spring-boot-starter
+ 4.9.15
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ 2.6.2
+
+
+ io.github.deweyjose
+ graphqlcodegen-maven-plugin
+ 1.14
+
+
+
+ generate
+
+
+
+
+
+ src/main/resources/schema/schema.graphqls
+
+ com.bealdung.graphqldgs.generated
+
+
+
+
+
+
diff --git a/graphql/graphql-dgs/src/main/java/com/bealdung/graphqlDGS/Album.java b/graphql/graphql-dgs/src/main/java/com/bealdung/graphqlDGS/Album.java
new file mode 100644
index 0000000000..7e53eb08fe
--- /dev/null
+++ b/graphql/graphql-dgs/src/main/java/com/bealdung/graphqlDGS/Album.java
@@ -0,0 +1,25 @@
+package com.bealdung.graphqlDGS;
+
+public class Album {
+ private final String title;
+ private final String artist;
+ private final Integer recordNo;
+
+ public Album(String title, String artist, Integer recordNo) {
+ this.title = title;
+ this.recordNo = recordNo;
+ this.artist = artist;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public String getArtist() {
+ return artist;
+ }
+
+ public Integer getRecordNo() {
+ return recordNo;
+ }
+}
diff --git a/graphql/graphql-dgs/src/main/java/com/bealdung/graphqlDGS/AlbumsDataFetcher.java b/graphql/graphql-dgs/src/main/java/com/bealdung/graphqlDGS/AlbumsDataFetcher.java
new file mode 100644
index 0000000000..8fda98b941
--- /dev/null
+++ b/graphql/graphql-dgs/src/main/java/com/bealdung/graphqlDGS/AlbumsDataFetcher.java
@@ -0,0 +1,28 @@
+package com.bealdung.graphqlDGS;
+
+import com.netflix.graphql.dgs.DgsComponent;
+import com.netflix.graphql.dgs.DgsQuery;
+import com.netflix.graphql.dgs.InputArgument;
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@DgsComponent
+public class AlbumsDataFetcher {
+
+ private final List albums = Arrays.asList(
+ new Album("Rumours", "Fleetwood Mac", 20),
+ new Album("What's Going On", "Marvin Gaye", 10),
+ new Album("Pet Sounds", "The Beach Boys", 12)
+ );
+
+ @DgsQuery
+ public List albums(@InputArgument String titleFilter) {
+ if(titleFilter == null) {
+ return albums;
+ }
+ return albums.stream()
+ .filter(s -> s.getTitle().contains(titleFilter))
+ .collect(Collectors.toList());
+ }
+}
diff --git a/graphql/graphql-dgs/src/main/java/com/bealdung/graphqlDGS/Application.java b/graphql/graphql-dgs/src/main/java/com/bealdung/graphqlDGS/Application.java
new file mode 100644
index 0000000000..ffe8cb2a4e
--- /dev/null
+++ b/graphql/graphql-dgs/src/main/java/com/bealdung/graphqlDGS/Application.java
@@ -0,0 +1,13 @@
+package com.bealdung.graphqlDGS;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class Application {
+
+ public static void main(String[] args) {
+ SpringApplication.run(Application.class, args);
+ }
+
+}
diff --git a/graphql/graphql-dgs/src/main/resources/application.properties b/graphql/graphql-dgs/src/main/resources/application.properties
new file mode 100644
index 0000000000..8693adcbd6
--- /dev/null
+++ b/graphql/graphql-dgs/src/main/resources/application.properties
@@ -0,0 +1 @@
+server.servlet.context-path=
diff --git a/graphql/graphql-dgs/src/main/resources/schema/schema.graphqls b/graphql/graphql-dgs/src/main/resources/schema/schema.graphqls
new file mode 100644
index 0000000000..90691a7204
--- /dev/null
+++ b/graphql/graphql-dgs/src/main/resources/schema/schema.graphqls
@@ -0,0 +1,9 @@
+type Query {
+ albums(titleFilter: String): [Album]
+}
+
+type Album {
+ title: String
+ artist: String
+ recordNo: Int
+}
diff --git a/pom.xml b/pom.xml
index 6219bbc692..a5b6b31022 100644
--- a/pom.xml
+++ b/pom.xml
@@ -422,6 +422,7 @@
graphql/graphql-java
+ graphql/graphql-dgs
grpc
gson
guava-modules