Skip to content
This repository has been archived by the owner on Jun 14, 2020. It is now read-only.
/ graphql Public archive

A (Yet) Rudimentary API for Antville using GraphQL

Notifications You must be signed in to change notification settings

antville/graphql

Repository files navigation

The GraphQL Claustra

This is a basic implementation of a JSON API for Antville using GraphQL.

Installation

Add the graphql folder to your claustra directory and enable the claustra in your application’s app.properties file:

# Multiple claustra can be enabled comma-separated
claustra = graphql

Example Request

$ curl -if http://localhost:8080/helma/antville/claustra/graphql -d \ 
  "query=query {site(name: 'blog') {stories(max: 1) {title url created creator}}}"

HTTP/1.1 200 OK
Set-Cookie: HopSession=fe80:0:0:0:0:0:0:1l574os0if9s0; Path=/; HttpOnly
ETag: "vLwa7i/9IVurZgCo9HGfhw=="
Content-Length: 191
Content-Type: application/json; charset=UTF-8
Server: Jetty(8.1.22.v20160922)

{"site":{"stories":[{"creator":"p3k","created":"Sat Jan 16 2016 23:35:51 GMT+0100 (CET)","title":"Samstag, 16. Januar 2016","url":"http://localhost:8080/helma/antville/blog/stories/8638/"}]}}

Resources

Releases

No releases published

Packages

No packages published