nadel

GraphqL Java

License

License

MIT
Categories

Categories

Java Languages
GroupId

GroupId

com.graphql-java
ArtifactId

ArtifactId

nadel
Last Version

Last Version

2021-03-26T09-09-21-fabd441
Release Date

Release Date

Type

Type

jar
Description

Description

nadel
GraphqL Java
Project URL

Project URL

https://github.com/graphql-java/nadel
Source Code Management

Source Code Management

https://github.com/graphql-java/nadel

Download nadel

How to add to project

<!-- https://jarcasting.com/artifacts/com.graphql-java/nadel/ -->
<dependency>
    <groupId>com.graphql-java</groupId>
    <artifactId>nadel</artifactId>
    <version>2021-03-26T09-09-21-fabd441</version>
</dependency>
// https://jarcasting.com/artifacts/com.graphql-java/nadel/
implementation 'com.graphql-java:nadel:2021-03-26T09-09-21-fabd441'
// https://jarcasting.com/artifacts/com.graphql-java/nadel/
implementation ("com.graphql-java:nadel:2021-03-26T09-09-21-fabd441")
'com.graphql-java:nadel:jar:2021-03-26T09-09-21-fabd441'
<dependency org="com.graphql-java" name="nadel" rev="2021-03-26T09-09-21-fabd441">
  <artifact name="nadel" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.graphql-java', module='nadel', version='2021-03-26T09-09-21-fabd441')
)
libraryDependencies += "com.graphql-java" % "nadel" % "2021-03-26T09-09-21-fabd441"
[com.graphql-java/nadel "2021-03-26T09-09-21-fabd441"]

Dependencies

compile (3)

Group / Artifact Type Version
com.graphql-java : graphql-java jar 2021-03-22T20-02-28-3a701a0f
org.antlr : antlr4-runtime jar 4.8
org.slf4j : slf4j-api jar 1.7.25

Project Modules

There are no modules declared in this project.

Nadel: A distributed GraphQL engine

Nadel is a Java library to combine several graphql services together. This is achieved by combining several underlying GraphQL services (schemas) into one schema (overall schema).

The main purpose of this library is to power a GraphQL gateway which serves as the entry point for executing requests across different services while presenting one GraphQL API.

Nadel GraphQL Gateway

This is achieved by declaring the services, which should be combined, in a DSL which is build on top of the GraphQL SDL (Schema Definition Language).

While this library is in Java, the underlying services only need to provide a standard GraphQL API and no Java Code is required to combine services together. It is all done declarative as part of the DSL.

Example:

Lets assume we have two Services: "Issues" and "Users". One has Issues and one has Users. An Issue has a reference to its authors.

This is the schema for the Issues service:

type Query {
    issues: [Issue]
}
type Issue {
    id: ID
    authorIds: [ID]
}

And this is the Users service:

type Query {
    users(ids: [ID]): [User]
}
type User {
    id: ID
    fullName: String
}

This is how you would combine these two services together with Nadel while also renaming a field at the same time.

service Issues {
    type Query {
        issues: [Issue]
    }
    type Issue {
        id: ID
        authors: [User] => hydrated from Users.users(ids: $source.authorIds) object identified by id, batch size 10
    }
}

service Users {
    type Query {
        users(ids: [ID]): [User]
    }
    type User {
        id: ID
        name: String => renamed from fullName
    }
}

The result is a new GraphQL API which combines the two services in one and has the following schema:

type Query {
    issues: [Issue]
    users(ids: [ID]): [User]
}       
type Issue {
    id: ID
    authors: [User]
}
type User {
    id: ID
    name: String
}

Features

  • Explicit overall schema design: every field for the overall schema needs to be declared in the Nadel DSL. If it is not declared it will not be exposed
  • Hydration: resolving referencing to other objects by calling another service
  • Field rename: renaming field from the underlying schema to a new name in the overall schema
  • Type rename: renaming a type from the underlying schema to a new name in the overall schema
  • Batching: Hydration calls are automatically batched with a configurable max batch size per call

Getting started

com.graphql-java

GraphQL Java

GraphQL server implementation for Java/JVM

Versions

Version
2021-03-26T09-09-21-fabd441
2021-03-25T23-15-58-fd2af49
2021-03-24T05-09-17-32b4efd
2021-03-11T23-23-21-8e2f1e8
2021-03-11T23-22-56-9e9875d
2021-03-11T00-42-24-6b4b7f0
2021-03-08T00-24-52-d7b4e67
2021-03-03T03-48-32-e3b54ce
2021-02-24T06-02-24-3d89ebe
2021-02-24T06-00-40-876b76e
2021-02-22T23-09-43-4cedfe0
2021-02-21T22-18-28-449a102
2021-02-17T23-14-22-aa72db2
2021-02-17T05-28-35-7b40f0a
2021-02-11T06-43-47-867230d
2021-02-11T05-41-59-7ac10fe
2021-02-11T04-00-27-9898df1
2021-02-04T03-41-28-a129bfa
2021-02-01T06-04-17-a71440f
2021-01-29T05-10-58-759e54a
2021-01-19T04-38-40-853303e
2021-01-17T23-30-55-be95bcd
2021-01-15T01-53-36-ac9c143
2021-01-12T22-42-24-b351977
2021-01-12T03-55-00-a480739
2021-01-07T05-21-34-5c86b35
2021-01-07T01-43-05-2e7fe51
2020-12-23T02-30-38-aac8028
2020-12-17T01-55-39-0338ed0
2020-12-13T23-07-15-6fcb0d4
2020-12-02T03-54-17-6874e67
2020-11-25T03-12-52-1cb1c2e
2020-11-13T01-22-05-5c3fef2
2020-10-15T00-35-51-d7509c9
2020-10-07T00-59-43-29ec893
2020-09-30T09-12-46-09d044d
2020-08-27T05-01-00-0e1aaee
2020-07-15T07-48-21-1c8a62a
2020-07-08T22-26-59-d2841fe
2020-07-03T01-05-17-e00bf33
2020-06-29T06-53-54-e488aa4
2020-06-01T10-41-46-386b507
2020-06-01T07-44-53-0192702
2020-05-14T05-39-16-d7f4a06
2020-05-12T00-48-05-3a9406e
2020-05-07T01-11-52-91cdaaa
2020-05-06T00-04-25-19297b4
2020-05-05T00-58-52-ac802a0
2020-05-04T06-02-26-3402697
2020-04-30T06-06-30-70fb515
2020-04-30T05-53-06-43e3dbc
2020-04-30T05-49-36-fd43798
2020-04-23T05-22-35-d99a6e3
2020-03-17T03-08-44-b4b497a
2020-02-26T05-30-31-689008f
2020-02-25T02-23-45-40786b7
2020-02-24T04-09-07-5fe5a09
2020-02-11T00-00-50-8303e88
2020-02-10T05-11-34-8ff5648
2020-02-05T00-28-03-456f21f
2020-02-04T01-09-51-a789845
2020-01-20T05-50-08-aeb62df
2020-01-13T03-29-02-2f5ef93
2019-12-30T00-22-37-ee2f101
2019-12-23T22-23-30-b8dca7f
2019-12-19T04-49-59-bfb1110
2019-12-18T23-38-49-e2ceea2
2019-12-18T23-34-43-607a086
2019-12-18T23-32-33-10206c5
2019-12-13T03-53-35-6fca74a
2019-11-19T06-06-03-6627ad2
2019-11-19T06-04-23-0cf62fb
2019-11-06T23-36-16-b5d3cf8
2019-10-31T03-47-46-8d3ab5c
2019-10-30T04-03-13-3334ea8
2019-10-20T23-17-35-3b4e1a2
2019-10-15T03-40-04-7fe91c4
2019-09-25T05-00-01-68b7ea9
2019-09-23T00-02-32-ae3c19d
2019-09-19T22-50-47-d9b52b8
2019-09-19T02-13-45-8ca4e85
2019-08-29T04-04-00-699c4ec
2019-08-28T01-58-00-10c3d4a
2019-08-27T23-59-12-a90cc19
2019-08-26T02-56-41-e6cdbf1
2019-08-26T00-16-48-d8c2d58
2019-08-21T22-54-57-4b4bb77
2019-08-21T06-58-27-232a662
2019-08-21T03-16-06-837b1ae
2019-08-21T01-42-44-6ba8741
2019-08-21T00-49-12-7ec9c8d
2019-08-14T22-57-07-5cba222
2019-08-13T21-48-56-efe54b4
2019-08-13T01-19-05-a7be426
2019-08-12T23-43-25-342bf7c
2019-08-09T02-20-52-d91e86b
2019-08-07T03-22-25-91fd857
2019-08-05T21-03-40-a7783d1
2019-08-05T07-13-01-1567a34
2019-08-02T05-06-24-5932656
2019-08-01T04-37-45-0bd7b76
2019-07-31T23-49-16-8548479
2019-07-31T03-45-49-98bb284
2019-07-23T01-52-01-66082e8
2019-07-17T22-57-01-33fa819
2019-07-11T07-00-46-e76a85f
2019-07-10T23-44-00-249c702
2019-07-04T00-27-55-73ae831
2019-07-02T04-19-21-8fb0bd6
2019-06-21T05-15-51-d4f1130
2019-06-21T04-26-21-0b2c2c5
2019-06-21T04-20-34-37447bb
2019-06-21T04-14-28-6914a7a
2019-06-21T04-13-01-bd8e9b3
2019-06-21T04-11-11-8b0b7b1
2019-06-14T06-29-59-ac0a4f4
2019-06-13T07-12-03-f20292b
2019-06-11T05-24-49-2ffa843
2019-06-11T00-28-13-034ea08
2019-06-11T00-07-28-9b1d4bd
2019-06-10T23-54-32-5707666
2019-06-03T07-00-57-eefb06e
2019-06-03T03-31-16-5fa1c5f
2019-06-03T01-07-29-a604c25
2019-05-27T06-46-59-238c720
2019-05-27T01-55-55-32871fc
2019-05-20T03-11-41-2a6e566
2019-05-17T06-22-28-c98b66f
2019-05-14T06-37-31-a2abbe3
2019-05-13T06-37-11-3c11595
2019-05-13T05-53-45-e028a96
2019-05-13T01-33-26-ba9cf3b
2019-05-09T07-42-44-3a64ff6
2019-05-09T01-05-24-5e2d478
2019-05-08T23-22-37-93822f8
2019-05-08T22-29-55-6569d16
2019-04-29T23-30-08-1efe487
2019-04-11T05-15-30-76857ac
2019-04-08T08-41-51-e301e97
2019-04-08T04-05-21-b84ed0d
2019-04-08T03-23-40-dbc7f74
2019-04-02T05-10-03-f09b717
2019-04-02T01-04-32-1770752
2019-03-27T02-45-46-3355f53
2019-03-26T04-11-47-14194ed
2019-03-21T04-55-22-8bbcd18
2019-03-20T02-33-08-179c59c
2019-03-20T00-09-49-f986993
2019-03-19T22-58-16-3d80e79
2019-03-19T04-25-06-f09718c
2019-03-19T00-39-24-74bdb81
2019-03-19T00-29-30-8671872
2019-03-05T04-47-44-fd3680b
2019-01-18T00-23-57-3615676
2018-12-11T19-38-48-3826ea2
2018-12-04T23-29-16-1cd5f6f
2018-11-13T03-33-03-354f9ec
2018-10-31T01-20-00-42bcd5d
2018-10-26T17-17-26-6a76e44
2018-10-26T17-08-14-9c4c00e
2018-10-24T20-21-09-71e9058
2018-10-17T16-21-04-a88497e
2018-09-20T07-27-07-a79aa82
2018-09-18T00-33-08-639fb8b
2018-09-17T09-01-29-611c44b
2018-09-13T22-48-18-77b984a
2018-09-05T16-55-35-9859af3
2018-08-23T17-28-02-881a2a5
2018-08-21T23-05-18-2cb0f10
2018-08-01T07-35-06-91025c9
2018-07-30T02-17-24-91985d3
2018-07-13T09-47-49-31c2922
2018-07-09T06-30-06-8d446b6
2018-07-09T06-28-29-b2b6136
2018-07-09T06-21-50-99ebf36
2018-07-09T01-51-13-84667e9
2018-07-09T01-47-33-f266f96
2018-07-02T04-06-19-5e64dad