Code Monkey home page Code Monkey logo

dgs-federation-example's Introduction

This repository is a GraphQL demo of using the DGS framework together with Apollo Federation Server.

Documentation for the DGS framework can be found here.

The repository contains three separate projects:

  1. shows-dgs: A Kotlin GraphQL service providing the federated Show type
  2. reviews-dgs: A Java GraphQL service that extends the Show type with reviews
  3. apollo-gateway: An instance of Apollo Server acting as the Federated Gateway

The shows-dgs and reviews-dgs projects are Gradle projects. The apollo-gateway is a Node project. We recommend to import the three individual projects in Intellij.

Running the demo

  1. Start show-dgs by running the Spring Boot app from the IDE or ./gradlew bootRun
  2. Start reviews-dgs by running the Spring Boot app from the IDE or ./gradlew bootRun
  3. Run npm install in the apollo-gateway project
  4. Run node index.js in the apollo-gateway project
  5. Open http://localhost:4000 for the query editor

The following is a federated query that should work.

{
  shows {
    title
    reviews {
      starRating
    }
  }
}

Other DGS framework examples

dgs-federation-example's People

Contributors

berngp avatar dependabot[bot] avatar maycxc avatar paulbakker avatar srinivasankavitha avatar sullrich84 avatar thejc 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.