• Stars
    star
    155
  • Rank 240,864 (Top 5 %)
  • Language
    Kotlin
  • License
    Apache License 2.0
  • Created almost 7 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A GraphQL execution engine for distributed schemas

Nadel: A distributed GraphQL engine

Nadel is a Kotlin 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

Features

  • Compatible with Java codebases.
  • Directive based approach. Existing GraphQL tooling will continue to work.
  • Flexible GraphQL transform API. Modify fields and service call responses programmatically using the API.
  • Explicit overall schema design: if a schema member is not declared in the .nadel file it is not exposed.
  • Hydration: resolves references to other objects by calling other services.
  • Batching: hydration calls can be automatically batched with a configurable max batch size per call.
  • Field rename: fields can be given new names in the context of the exposed schema.
  • Type rename: types can be given new names in the context of the exposed schema.
  • Dynamic service resolution: ability to programmatically decide which service is called for a top level field.

Example

Let's assume we have two services: "Issues" and "Users". One has exposes issues and one has users. An Issue has a reference to its author User.

This is the schema for the Issues service:

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

And this is the Users service:

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

You can define a combined Nadel schema as follows.

# In Issue.nadel
type Query {
    issues: [Issue]
}
type Issue {
    id: ID
    author: User @hydrated(
        # This fetches users in batches
        field: "users"
        arguments: [{ name: "ids" value: "$source.authorId" }]
        inputIdentifiedBy: [{ sourceId: "authorId" resultId: "id" }]
    )
}

# In User.nadel
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
}

The outside world does not know about the transformations applied by Nadel. It can simply query the data and Nadel will handle the rest e.g. under the hood Nadel will invoke Users for users data if Issue.author is requested for.

You can visit our test fixtures folder for many more examples.

Dev setup

In order to run the tests from EngineTests in IntelliJ you need to have the KoTest plugin installed.

Understanding Nadel.

More Repositories

1

compiled

A familiar and performant compile time CSS-in-JS library for React.
TypeScript
1,986
star
2

storybook-addon-performance

🚧 A storybook addon to help better understand and debug performance for React components.
TypeScript
634
star
3

react-resource-router

Configuration driven routing solution for React SPAs that manages route matching, data fetching and progressive rendering
TypeScript
200
star
4

peerd

peerd is an AWS VPC Peering Connection management tool. It creates full-meshes of VPCs from a yaml file, and manages the full lifecycle of creation, deletion and route table updates needed to make VPC peerings useful across accounts and regions. Contributions welcome.
Python
134
star
5

react-loosely-lazy

Use advanced React async components patterns today
TypeScript
124
star
6

json-schema-viewer

A JSON Schema Viewer for any JSON Schema on earth.
TypeScript
120
star
7

webpack-deduplication-plugin

Plugin for webpack that de-duplicates transitive dependencies in yarn and webpack-based projects.
JavaScript
76
star
8

Flowbius

Kotlin Flow <-> Spotify Mobius interop
Kotlin
57
star
9

atlassian-slack-integration-server

Slack plugins for Jira, Confluence and Bitbucket Server
Java
32
star
10

data-center-grafana-dashboards

22
star
11

cyclops

Cyclops Kubernetes Node Auto Cycling Toolset
Go
22
star
12

compass-examples

Example apps and code snippets for Atlassian Compass
Python
22
star
13

data-center-terraform

This project provides App vendors in Atlassian ecosystem with ready to use environment setup tool for Data Center products.
HCL
19
star
14

babel-plugin-storybook-csf-title

A Babel plugin to generate titles for Storybook CSF stories at compile time, typically based on the story file's file name.
JavaScript
17
star
15

connect-security-req-tester

A tool to check your Atlassian Connect app against Atlassian's security requirements.
Python
15
star
16

gitlab-for-compass

Compass integration with source code management tool GitLab.
TypeScript
14
star
17

Jira-DC-Grafana-Dashboards

12
star
18

issue-status-helper

An example Forge application for automatically managing Jira issue status
TypeScript
12
star
19

jira-release-blocker

Shell
10
star
20

bootgraph

Kotlin
9
star
21

db-replica

Automatically chooses between database connections to read-write main or read-only replica
Java
8
star
22

msteams-jira-server

Microsoft Teams plugin for Jira Server
C#
7
star
23

compiled-website

The documentation website for Compiled (CSS-in-JS). Please don't merge to this repo - we have moved to https://github.com/atlassian-labs/compiled !
MDX
7
star
24

Earl

Earl is a tool designed to help estimate how much you spent on DynamoDb in the last week. It can help you tweak your auto scaling settings to help you minimise wastage and compare the cost of provisioned vs. on-demand capacity modes.
Kotlin
6
star
25

msteams-jira-server-addon

Official plugin for Jira Server that integrates with Microsoft Teams.
Java
5
star
26

inline-require-webpack-plugin

Optimise generated bundles by inline requiring ES modules, without CommonJS deoptimisations
TypeScript
5
star
27

FSRT

A static analyzer for finding Forge app vulnerabilities
Rust
4
star
28

observe

@observe is a Python decorator
Python
4
star
29

transfer-api-ref-client

Reference API implementation that supports large file uploads (>100GB) in a chunked and resumable fashion to https://transfer.atlassian.com
Python
4
star
30

oss-maven-template

A template for Maven-based projects that should be published to Maven Central.
Java
4
star
31

aql

Go library for generating various Atlassian Query Language(s)
Go
4
star
32

DC-App-monitoring-EAP-dashboards

Grafana dashboards to accompany the DC App monitoring EAP Java agent
2
star
33

artifact-publish-token

Custom Action to retrieve temporary tokens to publish artifacts
JavaScript
2
star
34

Compass-Orb

An orb for reporting the status of CircleCI builds and deployments to Atlassian Compass
Shell
2
star
35

kotlin-url-dsl

Build URL as Kotlin code which resembles the URL it generates.
Kotlin
2
star
36

figma-for-jira

A Connect app for integrating Figma designs into Jira.
TypeScript
2
star
37

visually-complete

TypeScript
2
star
38

prosemirror-kotlin

Kotlin implementation of Prosemirror
Kotlin
2
star
39

zephyr-squad-to-scale-migration

Java
2
star
40

jql-kotlin

Build JQL query as Kotlin code which resembles the query it generates.
Kotlin
1
star
41

gradle-release

Gradle plugin which can release an open source Atlassian lib to Maven.
Kotlin
1
star
42

tectonics

Atlaskit, but with Web Components
TypeScript
1
star
43

oss-gradle-template

A template for Atlassian open source projects based on Gradle
Java
1
star
44

prosemirror-test-builder

1
star