Giter Site home page Giter Site logo

weekens / federation-jvm-spring-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from apollographql/federation-jvm-spring-example

0.0 0.0 0.0 161 KB

Apollo Federation JVM example implementation using Spring GraphQL

License: MIT License

JavaScript 6.05% Java 71.91% Kotlin 22.04%

federation-jvm-spring-example's Introduction

Federation JVM Spring Example

Apollo Federation JVM example implementation using Spring GraphQL. If you want to discuss the project or just say hi, stop by the Apollo community forums.

The repository contains three separate projects:

  1. products-subgraph: A Java GraphQL service providing the federated Product type
  2. reviews-subgraph: A Java GraphQL service that extends the Product type with reviews
  3. gateway: An instance of Apollo Server acting as the Federated Gateway

See individual projects READMEs for detailed instructions on how to run them.

Running the demo

  1. Start products-subgraph by running the Spring Boot app from the IDE or by running ./gradlew bootRun from products-subgraph project
  2. Start reviews-subgraph by running the Spring Boot app from the IDE or ./gradlew bootRun from reviews-subgraph project
  3. Start Federated Gateway
    1. Install required packages by running npm install in the gateway project
    2. Start gateway by running npm run start in the gateway project
  4. Open http://localhost:4000 for the query editor

Example federated query

query ExampleQuery {
    products {
        id
        name
        description
        reviews {
            id
            text
            starRating
        }
    }
}

Other Federation JVM examples

federation-jvm-spring-example's People

Contributors

dariuszkuc avatar renovate[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.