Consuming GraphQL APIs from Java applications

StepZen and Vaadin logo

Updated for 2024.

GraphQL has become a common alternative to REST as a way to provide data to modern web applications. They both solve the same problem, but GraphQL comes with a different set of trade-offs. It is designed to answer challenges pertinent to larger organizations, such as inter-team communication and development velocity.

Unlike REST, GraphQL puts more flexibility – and more work – into the hands of API client developers. And yet Java developers have the tools that make creating GraphQL clients easy and straightforward.

Subscribe to our newsletter

Be the first to learn about new Vaadin resources and tips

Build an advanced chat app in Java with OpenAI chatbot integration. Learn how to use OpenAI's Chat API for intelligent, responsive bots.

Building an OpenAI-powered chatbot in Java

Updated in August 2024. Want to build a better version of ChatGPT? Learn how to integrate OpenAI's Chat Completions API to add an intelligent chatbot to your Vaadin Flow chat application. Create a new chat app with OpenAI chatbot integration Using the service at start.vaadin.com, create a new ...
Consuming REST Services from Java applications

Consuming REST services from Java applications

Using REST services is still the de facto way of providing data to traditional front-end applications. They often act as a "public API" for third-party solutions like mobile apps or as a "persistence layer" for client-side web apps (React, Vue, etc.). Java is probably the most common platform for ...

DDD Part 3: Domain-Driven Design and the Hexagonal Architecture

This is the third part of our in-depth series on Domain-Driven Design (DDD). Part one discussed strategic domain-driven design and part two discussed tactical domain-driven design. Updated for 2023. In this article, we'll take a look at how to turn a domain model into working software - ...

DDD Part 1: Strategic Domain-Driven Design

This is the first part of our in-depth series on Domain-Driven Design (DDD). Part two discusses tactical DDD, whereas, in part three, you'll learn how to apply DDD to working software using Java and Vaadin. Updated for 2023. Domain-Driven Design (DDD) has been around since Eric Evans published his ...

Deploying a Spring Boot app as a native GraalVM image with Docker

In this final part of the Building an AI chatbot in Java series, we will deploy the Spring Boot AI chatbot application we've built as a GraalVM native image. Requirements The instructions in the article assume you are working with the Hilla Spring Boot application we've built in the series, but the ...

Building a ChatGPT-based AI bot using Spring Boot, React, and Hilla

In this article, we'll build a custom AI chatbot application using Hilla, Spring Boot, React, OpenAI (ChatGPT), and Pinecone. The chatbot is designed to answer Vaadin Flow and Hilla development questions using up-to-date documentation as reference material. My earlier blog post details the concept. ...

Enhancing ChatGPT with Prompt Engineering and Token Counting in Java

This article is part three of the Building an AI chatbot in Java series, where we're building a custom AI chatbot application using Hilla, Spring Boot, React, OpenAI (ChatGPT), and Pinecone. The chatbot is designed to answer Vaadin Flow and Hilla development questions using up-to-date documentation ...

Integrating Pinecone Vector Database into a Spring Boot Application

Dive into the process of integrating the Pinecone Vector database with a Spring Boot application using Java in this second installment of the Building an AI chatbot in Java series. Prerequisites The article assumes you have a Spring Boot application. The example project is a Spring Boot application ...

Calling ChatGPT and OpenAI APIs in Spring Boot with Java

This article will guide you on integrating OpenAI APIs, such as ChatGPT, in your Spring Boot application. We will cover moderation, embedding, and chat completion requests. It is a part of our Building an AI chatbot in Java series. Prerequisites This tutorial assumes you already have a Spring Boot ...