glitr

A library that lets you use Plain Old Java Objects to describe your GraphQL schema.

License

License

MIT
GroupId

GroupId

com.nfl.glitr
ArtifactId

ArtifactId

glitr
Last Version

Last Version

1.14.1-2019-09-17T11-38-32
Release Date

Release Date

Type

Type

jar
Description

Description

glitr
A library that lets you use Plain Old Java Objects to describe your GraphQL schema.
Project URL

Project URL

https://github.com/nfl/glitr
Source Code Management

Source Code Management

https://github.com/nfl/glitr

Download glitr

How to add to project

<!-- https://jarcasting.com/artifacts/com.nfl.glitr/glitr/ -->
<dependency>
    <groupId>com.nfl.glitr</groupId>
    <artifactId>glitr</artifactId>
    <version>1.14.1-2019-09-17T11-38-32</version>
</dependency>
// https://jarcasting.com/artifacts/com.nfl.glitr/glitr/
implementation 'com.nfl.glitr:glitr:1.14.1-2019-09-17T11-38-32'
// https://jarcasting.com/artifacts/com.nfl.glitr/glitr/
implementation ("com.nfl.glitr:glitr:1.14.1-2019-09-17T11-38-32")
'com.nfl.glitr:glitr:jar:1.14.1-2019-09-17T11-38-32'
<dependency org="com.nfl.glitr" name="glitr" rev="1.14.1-2019-09-17T11-38-32">
  <artifact name="glitr" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.nfl.glitr', module='glitr', version='1.14.1-2019-09-17T11-38-32')
)
libraryDependencies += "com.nfl.glitr" % "glitr" % "1.14.1-2019-09-17T11-38-32"
[com.nfl.glitr/glitr "1.14.1-2019-09-17T11-38-32"]

Dependencies

compile (11)

Group / Artifact Type Version
com.nfl.glitr : glitr-core jar 0.0.5
com.graphql-java : graphql-java jar 13.0
org.apache.commons : commons-lang3 jar 3.8.1
commons-beanutils : commons-beanutils jar 1.9.3
com.google.code.findbugs : jsr305 jar 3.0.0
com.google.guava : guava jar 27.0.1-jre
com.googlecode.gentyref : gentyref jar 1.2.0
io.reactivex : rxjava jar 1.1.3
javax.validation : validation-api jar 1.1.0.Final
com.fasterxml.jackson.core : jackson-databind jar 2.9.9.2
net.objecthunter : exp4j jar 0.4.8

Project Modules

There are no modules declared in this project.

GLiTR

Build Status Maven Central Download License

A library that lets you use Plain Old Java Objects to describe your GraphQL schema.

Binaries

Example for Maven:

<dependency>
    <groupId>com.nfl.glitr</groupId>
    <artifactId>glitr</artifactId>
    <version>x.y.z</version>
</dependency>

Example for gradle:

compile("com.nfl.glitr:glitr:x.y.z")

Change history can be found here: CHANGELOG.md

How to use the latest build with Gradle

Add the repositories:

repositories {
    maven { url  "http://dl.bintray.com/nfl/maven" }
}

Dependency:

dependencies {
  compile 'com.nfl.glitr:INSERT_LATEST_VERSION_HERE'
}

How to use the latest build with Maven

Add the repository:

<repository>
    <snapshots>
        <enabled>false</enabled>
    </snapshots>
    <id>bintray-nfl-maven</id>
    <name>bintray</name>
    <url>http://dl.bintray.com/nfl/maven</url>
</repository>

Dependency:

<dependency>
    <groupId>com.nfl.glitr</groupId>
    <artifactId>glitr</artifactId>
    <version>INSERT_LATEST_VERSION_HERE</version>
</dependency>

How to use it

This is the famous "hello world" in graphql-java with GLiTR:

import com.nfl.glitr.Glitr;
import com.nfl.glitr.GlitrBuilder;
import com.nfl.glitr.annotation.GlitrDescription;
import graphql.GraphQL;
import graphql.schema.DataFetchingEnvironment;

import java.util.Map;

public class HelloWorld {

    public static void main(String[] args) {

        Glitr glitr = GlitrBuilder.newGlitr()
                .withQueryRoot(new Root())
                .build();

        GraphQL graphQL = new GraphQL(glitr.getSchema());

        Map<String, Object> result = (Map<String, Object>) graphQL.execute("{hello}").getData();

        System.out.println(result); // Prints: {hello=World!}
    }

    @GlitrDescription("Where it all begins.")
    public static class Root {

        public String getHello(DataFetchingEnvironment environment) {
            return "World!";
        }
    }
}

Full Documentation

See the Wiki for full documentation, examples, operational details and other information.

Build

To build:

$ git clone [email protected]:NFL/glitr.git
$ cd glitr/
$ ./gradlew build

Further details on building can be found on the Getting Started page of the wiki.

Requirements

  • = Java 8

Examples

See glitr-examples for example implementation

Contact Info

LICENSE

GLiTR is licensed under the MIT License. See LICENSE for more details.

com.nfl.glitr

National Football League

Together, We Make Football. And Software.

Versions

Version
1.14.1-2019-09-17T11-38-32
1.13.1-2019-08-28T17-31-08
1.13.0-2019-08-28T01-39-04
1.12.2-2019-08-26T17-27-45
1.12.1-2019-08-14T19-06-06
1.12.0-2019-08-05T17-49-02
1.11.2-2019-04-11T18-08-13
1.11.1-2019-03-20T21-42-01
1.11.0-2019-03-20T20-32-38
1.10.0-2019-03-20T18-58-24
1.10.0-2019-03-20T18-23-39
1.9.2-2019-04-08T18-03-29
1.9.0-2019-01-05T00-49-40
1.8.3-2018-12-14T22-34-51
1.8.2-2018-12-11T22-41-22
1.8.1-2018-09-24T21-08-53
1.7.1-2018-09-19T19-58-14
1.7.0-2018-09-19T19-12-28
1.6.0-2018-09-18T20-38-39
1.5.13-2018-08-27T21-15-28
1.5.12-2018-08-24T03-07-00
1.5.11-2018-08-21T03-29-30
1.5.10-2018-07-31T00-12-43
1.5.9-2018-07-10T18-51-20
1.5.9-2018-06-28T21-46-24
1.5.8-2018-05-11T17-42-23
1.5.7-2018-05-10T16-59-59
1.5.7-2018-05-10T16-07-29
1.5.6-2018-04-26T20-58-31
1.5.5-2018-04-26T16-41-07
1.5.4-2018-04-17T19-11-25
1.5.4-2018-04-13T18-20-39
1.5.3-2018-04-11T21-32-57
1.5.3-2018-04-11T20-52-33
1.5.3-2018-04-05T21-27-00
1.5.2-2018-02-12T18-53-50
1.5.2-2018-02-12T18-33-54
1.5.1-2018-02-07T23-56-00
1.5.0-2018-02-07T02-18-19
1.4.1-2018-02-01T21-01-42
1.4.0-2018-01-18T00-32-36
1.3.0-2017-12-13T19-43-00
1.3.0-2017-11-27T21-09-23
1.2.6-2017-11-16T23-58-53
1.2.6-2017-11-02T21-14-11
1.2.6-2017-11-02T21-00-39
1.2.6-2017-11-02T20-41-32
1.2.6-2017-10-22T05-00-35
1.2.6-2017-10-12T02-55-31
1.2.4-2017-10-11T22-48-46
1.2.3-2017-09-29T01-12-23
1.2.2-2017-09-29T00-16-03
1.2.1-2017-09-26T22-49-58
1.1.6-2017-09-25T19-14-39
1.1.6-2017-09-24T06-21-22
1.1.6-2017-09-22T00-21-41
1.1.6-2017-09-11T23-27-32
1.1.6-2017-09-11T02-52-44
1.1.6-2017-09-07T20-35-34
1.1.6-2017-04-12T17-58-50
1.1.6-2017-04-11T21-06-27
1.1.5-2017-04-11T19-03-42
1.1.4-2017-04-10T19-07-32
1.1.3-2017-04-10T17-29-09
1.1.2-2017-01-10T22-38-53
1.1.2-2016-12-29T18-57-17
1.1.1-2016-11-30T21-46-52
1.1.0-2016-11-30T19-50-54
1.0.0-2016-10-27T22-13-26
1.0.0-2016-10-27T15-04-11
1.0.0