SkillAgentSearch skills...

Membership

Membership service (to demonstrate graphQL)

Install / Use

/learn @phillip-kruger/Membership
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

ALSO SEE: https://github.com/phillip-kruger/graphql-example for a more up to date example

Membership service

This is an example application that demonstrate how to add GraphQL to your existing JAX-RS Application.

Watch a short screencast here

This application use these libraries:

Simple CRUD Application that can create, update, delete and get a membership. Every membership has a owner. The application use JPA to persist the Object in a DB. "Business Logic" is in the Membership Service (EJB) and the JAX-RS API in MembershipRestApi.

Added annotations and MembershipGraphQLApi to expose API as GraphQL.

Getting started

From source

Get the source:

git clone https://github.com/phillip-kruger/membership.git
cd membership

This demo runs on Thorntail Build and start:

mvn clean install -Pthorntail

The server is now up and running with some test data populated (see resources/META-INF/load.sql)

Available endpoints:

  • Front page : http://localhost:8080/membership/
  • Swagger UI : http://localhost:8080/membership/rest/openapi-ui/
  • GraphiQL : http://localhost:8080/membership/graph/graphiql/

Also:

  • MicroProfile Health: http://localhost:8080/health/

Run some examples:

In the GraphiQL GUI try out some of the examples

Openshift

You can also deploy and run this in OpenShift. First log into the OpenShift enviroment:

oc login

If you do not already have a project, create one:

oc new-project demo --description="Some demo applications" --display-name="Demo"

Then run

mvn clean fabric8:deploy -Popenshift
View on GitHub
GitHub Stars18
CategoryDevelopment
Updated10mo ago
Forks3

Languages

Java

Security Score

87/100

Audited on May 20, 2025

No findings