npm version package license

Introduction

Create a GraphQL HTTP server with ES4X, a fast, unopinionated, minimalist JavaScript runtime for Vert.x.

Vert.x is a framework for asynchronous, scalable, concurrent applications, which aims to provide an alternative to Node.js for the JVM. It allows developers to write their application using JavaScript, Ruby, Groovy, Java or even mix and match.

To setup a minimal Vert.x HTTP server, follow the Getting Started of ES4X.

Installation

Simple Setup

GraphQL Playground / GraphiQL

GraphQL Playground and GraphiQL are graphical, interactive, in-browser GraphQL IDEs.

In development, Vert.x GraphQL Server enables GraphQL Playground on the same URL as the GraphQL server itself (e.g. http://localhost:9100/graphql) and automatically serves the GUI to web browsers. When ES4X_ENV is set to production, GraphQL Playground (as well as introspection) is disabled as a production best-practice.

Configuring Playground

Configuring GraphiQL

Themes GraphiQL

  • 3024-night
  • 3024-day
  • abcdef
  • ambiance-mobile
  • ambiance
  • base16-dark
  • base16-light
  • bespin
  • blackboard
  • cobalt
  • colorforth
  • darcula
  • dracula
  • duotone-dark
  • duotone-light
  • eclipse
  • elegant
  • erlang-dark
  • gruvbox-dark
  • hopscotch
  • icecoder
  • idea
  • isotope
  • lesser-dark
  • liquibyte
  • lucario
  • material
  • mbo
  • mdn-like
  • midnight
  • monokai
  • neat
  • neo
  • night
  • oceanic-next
  • panda-syntax
  • paraiso-dark
  • paraiso-light
  • pastel-on-dark
  • railscasts
  • rubyblue
  • seti
  • shadowfox
  • solarized
  • ssms
  • the-matrix
  • tomorrow-night-bright
  • tomorrow-night-eighties
  • ttcn
  • twilight
  • vibrant-ink
  • xq-dark
  • xq-light
  • yeti
  • zenburn

Enabling GraphiQL / Playground in production

To enable GraphiQL or Playground in production, introspection and the graphiql / playground can be enabled explicitly in the following manner.

Subscriptions

Subscriptions are GraphQL operations that watch events emitted from Vertx GraphQL Server. The native Vertx GraphQL Server supports GraphQL subscriptions without additional configuration.

Coming soon