smallrye-graphql icon indicating copy to clipboard operation
smallrye-graphql copied to clipboard

Implementation for MicroProfile GraphQL

:microprofile-graphql: https://github.com/eclipse/microprofile-graphql/ :graphql-over-http: https://github.com/graphql/graphql-over-http :subscriptions-transport-ws: https://github.com/apollographql/subscriptions-transport-ws :graphql-ws: https://github.com/enisdenjo/graphql-ws/blob/master/PROTOCOL.md

image:https://github.com/smallrye/smallrye-graphql/workflows/SmallRye%20Build/badge.svg?branch=main[link=https://github.com/smallrye/smallrye-graphql/actions?query=workflow%3A%22SmallRye+Build%22] image:https://sonarcloud.io/api/project_badges/measure?project=smallrye_smallrye-graphql&metric=alert_status["Quality Gate Status", link="https://sonarcloud.io/dashboard?id=smallrye_smallrye-graphql"] image:https://img.shields.io/github/license/thorntail/thorntail.svg["License", link="http://www.apache.org/licenses/LICENSE-2.0"] image:https://badges.gitter.im/smallrye-graphql/community.svg[link="https://gitter.im/smallrye-graphql/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"]

= SmallRye GraphQL

SmallRye GraphQL is an implementation of

  • {microprofile-graphql}[Eclipse MicroProfile GraphQL].
  • {graphql-over-http}[GraphQL over HTTP].
  • {graphql-ws}[GraphQL over WebSocket].
  • {subscriptions-transport-ws}[Subscriptions transport ws] (old).

== Instructions

=== Testing against the released v 2.0 of MicroProfile GraphQL

[source,bash]

mvn clean install

Note that some tests perform locale-sensitive assertions. If you use non-English locale, you need to adjust the command above. For example: LANG=C mvn clean install

=== Testing against the unreleased v 2.1-SNAPSHOT of MicroProfile GraphQL

(You need to build that version of MicroProfile GraphQL locally first to make the snapshot versions available in your repository)

[source,bash]

mvn clean install -Dversion.eclipse.microprofile.graphql=2.1-SNAPSHOT

=== Documentation

The live documentation is available at link:https://smallrye.io/smallrye-graphql[this link].

Info about how to build and manage the documentation is in docs/README.adoc.

=== Javax/Jakarta

The 1.5.x branch will be maintained for the javax namespace, and the main (2.x) branch for jakarta.

=== Project structure

==== Common

  • link:common/schema-model[Schema Model] (Serializable) that defines the schema.
  • link:common/schema-builder[Schema Builder] that create the model from Jandex.

==== Server

  • link:server/api[API] (pulling in the MicroProfile API) and allowing us to experiment with api feature not yet in the spec. Code from here might move the the spec at some point.
  • link:server/implementation[Implementation] of the Eclipse MicroProfile GraphQL API.
  • link:server/implementation-cdi[CDI] Module that allows lookup of GraphQL Endpoints via CDI
  • link:server/implementation-servlet[Servlet] Making the implementation available via Servlet
  • link:server/tck[TCK] Test suite to run the implementation against the {microprofile-graphql}[Eclipse MicroProfile GraphQL] TCK.
  • link:server/runner[Runner] Manual TCK testing with GraphiQL
  • link:server/integration-tests[IT] To run some Integration tests

==== Client

  • link:client/api[Client API] (pulling in the MicroProfile Client API) and allowing us to experiment with api feature not yet in the spec. Code from here might move the the spec at some point.
  • link:client/implementation[Client Implementation] of the Eclipse MicroProfile GraphQL Client API.
  • link:client/tck[Client TCK] Test suite to run the client-implementation against the {microprofile-graphql}[Eclipse MicroProfile GraphQL] Client TCK.

==== Tools

  • link:tools/maven-plugin[Maven plugin] that generates the GraphQL schema from source files.
  • link:tools/gradle-plugin[Gradle plugin] that generates the GraphQL schema from source files.

==== UI

  • link:ui/graphiql[GraphiQL] UI for your project

==== Documentation

  • link:docs[Documentation] SmallRye GraphQL documentation source

=== Links

  • http://github.com/smallrye/smallrye-graphql/[Project Homepage]
  • {microprofile-graphql}[Eclipse MicroProfile GraphQL]
  • https://smallrye.io/smallrye-graphql[SmallRye GraphQL Documentation]