All Projects → yahoo → Elide

yahoo / Elide

Licence: other
Elide is a Java library that lets you stand up a GraphQL/JSON-API web service with minimal effort.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Elide

Villus
🏎 A tiny and fast GraphQL client for Vue.js
Stars: ✭ 378 (-50.65%)
Mutual labels:  graphql, hacktoberfest
Graphql Engine
Blazing fast, instant realtime GraphQL APIs on your DB with fine grained access control, also trigger webhooks on database events.
Stars: ✭ 24,845 (+3143.47%)
Mutual labels:  graphql, hacktoberfest
Parse Server
API server module for Node/Express
Stars: ✭ 19,165 (+2401.96%)
Mutual labels:  graphql, hacktoberfest
Wp Graphql Acf
WPGraphQL for Advanced Custom Fields
Stars: ✭ 358 (-53.26%)
Mutual labels:  graphql, hacktoberfest
Cordova Js
Apache Cordova JavaScript Bridge
Stars: ✭ 598 (-21.93%)
Mutual labels:  hacktoberfest, mobile
Jdl Studio
JDL Studio is an online JHipster Domain Language visual editor
Stars: ✭ 365 (-52.35%)
Mutual labels:  hacktoberfest, jpa
Graphqlmap
GraphQLmap is a scripting engine to interact with a graphql endpoint for pentesting purposes.
Stars: ✭ 434 (-43.34%)
Mutual labels:  graphql, hacktoberfest
Parse Dashboard
A dashboard for managing your Parse Server Apps
Stars: ✭ 3,534 (+361.36%)
Mutual labels:  graphql, hacktoberfest
Stash
An organizer for your porn, written in Go
Stars: ✭ 591 (-22.85%)
Mutual labels:  graphql, hacktoberfest
Learn Graphql
Real world GraphQL tutorials for frontend developers with deadlines!
Stars: ✭ 586 (-23.5%)
Mutual labels:  graphql, hacktoberfest
Cht Core
The CHT Core Framework makes it faster to build responsive, offline-first digital health apps that equip health workers to provide better care in their communities. It is a central resource of the Community Health Toolkit.
Stars: ✭ 354 (-53.79%)
Mutual labels:  hacktoberfest, mobile
Offix
GraphQL Offline Client and Server
Stars: ✭ 694 (-9.4%)
Mutual labels:  graphql, hacktoberfest
Open Sauced
🍕 This is a project to identify your next open source contribution.
Stars: ✭ 352 (-54.05%)
Mutual labels:  graphql, hacktoberfest
Redux Json Api
Redux actions, action creators and reducers to make life with JSON APIs a breeze.
Stars: ✭ 374 (-51.17%)
Mutual labels:  json-api, hacktoberfest
Askql
AskQL is a query language that can express any data request
Stars: ✭ 352 (-54.05%)
Mutual labels:  graphql, hacktoberfest
Reactjs101
從零開始學 ReactJS(ReactJS 101)是一本希望讓初學者一看就懂的 React 中文入門教學書,由淺入深學習 ReactJS 生態系 (Flux, Redux, React Router, ImmutableJS, React Native, Relay/GraphQL etc.)。
Stars: ✭ 4,004 (+422.72%)
Mutual labels:  graphql, mobile
Open Source Xamarin Apps
📱 Collaborative List of Open Source Xamarin Apps
Stars: ✭ 318 (-58.49%)
Mutual labels:  hacktoberfest, mobile
Graphback
Graphback - Out of the box GraphQL server and client
Stars: ✭ 323 (-57.83%)
Mutual labels:  graphql, hacktoberfest
Cookiecutter Django Vue
Cookiecutter Django Vue is a template for Django-Vue projects.
Stars: ✭ 462 (-39.69%)
Mutual labels:  graphql, hacktoberfest
Testing Nestjs
A repository to show off to the community methods of testing NestJS including Unit Tests, Integration Tests, E2E Tests, pipes, filters, interceptors, GraphQL, Mongo, TypeORM, and more!
Stars: ✭ 685 (-10.57%)
Mutual labels:  graphql, hacktoberfest

Elide

Opinionated APIs for web & mobile applications.

Elide Logo

Spectrum Build Status Maven Central Coverage Status Code Quality: Java Total Alerts Mentioned in Awesome Java Mentioned in Awesome GraphQL

Read this in other languages: 中文.

Table of Contents

Background

Elide is a Java library that lets you setup model driven GraphQL or JSON API web service with minimal effort. Elide supports two variants of APIs:

  1. A CRUD (Create, Read, Update, Delete) API for reading and manipulating models.
  2. An analytic API for aggregating measures over zero or more model attributes.

Elide supports a number of features:

Security Comes Standard

Control access to fields and entities through a declarative, intuitive permission syntax.

Mobile Friendly APIs

JSON-API & GraphQL lets developers fetch entire object graphs in a single round trip. Only requested elements of the data model are returned. Our opinionated approach for mutations addresses common application scenarios:

  • Create a new object and add it to an existing collection in the same operation.
  • Create a set of related, composite objects (a subgraph) and connect it to an existing, persisted graph.
  • Differentiate between deleting an object vs disassociating an object from a relationship (but not deleting it).
  • Change the composition of a relationship to something different.
  • Reference a newly created object inside other mutation operations.

Filtering, sorting, pagination, and text search are supported out of the box.

Atomicity For Complex Writes

Elide supports multiple data model mutations in a single request in either JSON-API or GraphQL. Create objects, add them to relationships, modify or delete together in a single atomic request.

Analytic Query Support

Elide supports analytic queries against models crafted with its powerful semantic layer. Elide APIs work natively with Yavin to visualize, explore, and report on your data.

Schema Introspection

Explore, understand, and compose queries against your Elide API through generated Swagger documentation or GraphQL schema.

Customize

Customize the behavior of data model operations with computed attributes, data validation annotations, and request lifecycle hooks.

Storage Agnostic

Elide is agnostic to your particular persistence strategy. Use an ORM or provide your own implementation of a data store.

Documentation

More information about Elide can be found at elide.io.

Install

To try out an Elide example service (with a Postgres database), you can deploy via Heroku.

Deploy

The code that generates this example can be found here.

Alternatively, use elide-standalone which allows you to quickly setup a local instance of Elide running inside an embedded Jetty application.

Usage

The following examples leverage elide 5 (now in pre-release). For documentation on prior/stable versions, visit here.

For CRUD APIs

The simplest way to use Elide is by leveraging JPA to map your Elide models to persistence:

The models should represent the domain model of your web service:

@Entity
public class Book {

    @Id
    private Integer id;

    private String title;

    @ManyToMany(mappedBy = "books")
    private Set<Author> authors;
}

Add Elide annotations to both expose your models through the web service and define security policies for access:

@Entity
@Include(rootLevel = true)
@ReadPermission("Everyone")
@CreatePermission("Admin OR Publisher")
@DeletePermission("Noone"
@UpdatePermission("Noone")
public class Book {

    @Id
    private Integer id;

    @UpdatePermission("Admin OR Publisher")
    private String title;

    @ManyToMany(mappedBy = "books")
    private Set<Author> authors;
}

Add Lifecycle hooks to your models to embed custom business logic that execute inline with CRUD operations through the web service:

@Entity
@Include(rootLevel = true)
@ReadPermission("Everyone")
@CreatePermission("Admin OR Publisher")
@DeletePermission("None")
@UpdatePermission("None")
@LifeCycleHookBinding(operation = UPDATE, hook = BookCreationHook.class, phase = PRECOMMIT)
public class Book {

    @Id
    private Integer id;

    @UpdatePermission("Admin OR Publisher")
    private String title;

    @ManyToMany(mappedBy = "books")
    private Set<Author> authors;
}

public class BookCreationHook implements LifeCycleHook<Book> {
    @Override
    public void execute(LifeCycleHookBinding.Operation operation,
                        LifeCycleHookBinding.TransactionPhase phase,
                        Book book,
                        RequestScope requestScope,
                        Optional<ChangeSpec> changes) {
       //Do something
    }
}

Map expressions to security functions or predicates that get pushed to the persistence layer:

    @SecurityCheck("Admin")
    public static class IsAdminUser extends UserCheck {
        @Override
        public boolean ok(User user) {
            return isUserInRole(user, UserRole.admin);
        }
    }

To expose and query these models, follow the steps documented in the getting started guide.

For example API calls, look at:

  1. JSON-API
  2. GraphQL

For Analytic APIs

Analytic models including tables, measures, dimensions, and joins can be created with a friendly HJSON configuration language:

{
  tables: [
    {
      name: Orders
      table: order_details
      measures: [
        {
          name: orderTotal
          type: DECIMAL
          definition: 'SUM({{order_total}})'
        }
      ]
      dimensions: [
        {
          name: orderId
          type: TEXT
          definition: '{{order_id}}'
        }
      ]
    }
  ]
}

More information on configuring or querying analytic models can be found here.

Security

Security is documented in depth here.

Contribute

Please refer to the contributing.md file for information about how to get involved. We welcome issues, questions, and pull requests.

If you are contributing to Elide using an IDE, such as IntelliJ, make sure to install the Lombok plugin.

Discussion is on spectrum or through filing issues.

License

This project is licensed under the terms of the Apache 2.0 open source license. Please refer to LICENSE for the full terms.

Articles

Create a JSON API REST Service With Spring Boot and Elide

Custom Security With a Spring Boot/Elide Json API Server

Logging Into a Spring Boot/Elide JSON API Server

Securing a JSON API REST Service With Spring Boot and Elide

Creating Entities in a Spring Boot/Elide JSON API Server

Updating and Deleting with a Spring Boot/Elide JSON API Server

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].