Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eclipse/microprofile-graphql
microprofile-graphql
https://github.com/eclipse/microprofile-graphql
Last synced: 25 days ago
JSON representation
microprofile-graphql
- Host: GitHub
- URL: https://github.com/eclipse/microprofile-graphql
- Owner: eclipse
- License: apache-2.0
- Created: 2019-04-01T18:26:48.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-03-18T23:37:10.000Z (9 months ago)
- Last Synced: 2024-05-19T14:30:47.443Z (7 months ago)
- Language: Java
- Size: 1.44 MB
- Stars: 96
- Watchers: 31
- Forks: 40
- Open Issues: 89
-
Metadata Files:
- Readme: README.asciidoc
- Contributing: CONTRIBUTING.adoc
- License: LICENSE
Awesome Lists containing this project
- awesome-graphql-java - MicroProfile GraphQL - first Java GraphQL Services. (Schema Libraries / Code First)
README
//
// Copyright (c) 2020 Contributors to the Eclipse Foundation
//
// See the NOTICE file(s) distributed with this work for additional
// information regarding copyright ownership.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
image:https://github.com/eclipse/microprofile-graphql/workflows/Build/badge.svg[link="https://github.com/eclipse/microprofile-graphql/actions"]
image:https://javadoc.io/badge2/org.eclipse.microprofile.graphql/microprofile-graphql-api/javadoc.svg[link="https://javadoc.io/doc/org.eclipse.microprofile.graphql/microprofile-graphql-api"]
image:https://badges.gitter.im/eclipse/microprofile-graphql.svg[link="https://gitter.im/eclipse/microprofile-graphql"]= Microprofile GraphQL Specification
Read the https://download.eclipse.org/microprofile/microprofile-graphql-2.0/microprofile-graphql-spec-2.0.html[MicroProfile GraphQL 2.0] Specification
== Structure
This project consist of 3 parts:
* link:server/README.asciidoc[Server] - The server-side of MicroProfile GraphQL.
* link:client/README.asciidoc[Client] - The client-side of MicroProfile GraphQL.
* link:full/README.asciidoc[Full] - The combination of Server and Client.Implementations can decide to implement only the Server, or only the Client, or both.
== Use this in your project to depend on both the server and client API:
[source,xml,numbered]
----org.eclipse.microprofile.graphql
microprofile-graphql-api
1.0.3----
== About
GraphQL is an open-source data query and manipulation language for APIs, and a runtime for fulfilling queries with existing data.
It provides an alternative, though not necessarily a replacement for REST.GraphQL was developed internally by Facebook in 2012 before being publicly released in 2015.
On 7 November 2018, the GraphQL project was moved from Facebook to the newly-established https://www.linuxfoundation.org/press-release/2018/11/intent_to_form_graphql/[GraphQL foundation], hosted by the non-profit Linux Foundation.
This is a significant milestone in terms of industry and community adoption.
GraphQL is used by many large and small customers including Atlassian, Coursera, Facebook, GitHub, PayPal, Twitter, and https://graphql.org/users/[many more].* More info: https://en.wikipedia.org/wiki/GraphQL
* Home page: https://graphql.org/
* Specification: https://github.com/graphql/graphql-spec and https://facebook.github.io/graphql/draft/== Why GraphQL
The main reasons developers might want to use GraphQL are:* Improved data consumption for customers (IoS, Android, Web). Allowing for example to be able to retrieve several types of data in a single request or limiting the response data to exactly the specific data requested.
* Better analysis of the exhaustiveness of data calls (allowing to know the use of each node) and better manage the deletion of deprecated fields.
* Advanced developer experience:
** The schema defines how the data can be accessed and serves as the contract between the client and the server. Developer teams on both sides can work without further communication,
** Native schema introspection enabling to discover the API and to refine the queries on the client-side. This advantage is increased with graphical tools such as https://github.com/graphql/graphiql[GraphiQL] enabling smooth and easy API discovery,
** On the client-side, the query language provides a lot of flexibility and efficiency enabling developers to adapt to the constraints of their technical environments (IoS, Android, Web).== Why MicroProfile
The official purpose of MicroProfile is to optimize Enterprise Java for a microservices architecture and delivers application portability across multiple MicroProfile runtimes.
GraphQL is already widely used in Microservices architectures as the API Endpoint.
As noted in the Known java libraries section, there are several Java-based GraphQL libraries available, but none with the reach of the MicroProfile community.
GraphQL continues to grow in popularity, and as such there should be a specification for GraphQL development in Java.
MicroProfile is the optimal place to host that standard as it is open, ideally suited for incubating technologies, and has broad reach both in terms of the user community and vendor support.== What GraphQL is not
This specification will focus on making it easy for developers to create a GraphQL Service/Endpoint and publish it as an API.
Where the data comes from (NoSQL, Relational DB, another service, etc.) is not the concern of this Proposed Specification.== Implementations
* SmallRye GraphQL - https://github.com/smallrye/smallrye-graphql (standalone implementation)
* Open Liberty 20.0.0.6 - https://openliberty.io/blog/2020/06/05/graphql-open-liberty-20006.html
* Quarkus 1.5 - https://quarkus.io/blog/quarkus-1-5-final-released/
* Wildfly - https://www.wildfly.org/news/2020/08/13/Introducing-the-WildFly-GraphQL-feature-pack/
* Helidon 2.2.0 - https://medium.com/helidon/microprofile-graphql-support-now-available-in-helidon-mp-dbc7bc0b4af== Acknowledgements
This API and specification would not be possible without the enormous assistance from the https://github.com/leangen/graphql-spqr[GraphQL SPQR project].
== Contributing
Do you want to contribute to this project? link:CONTRIBUTING.adoc[Find out how you can help here].