GithubHelp home page GithubHelp logo

gql-middle-earth's Introduction

GraphQL Ins & Outs

Talk/Workshop by Jorge Duque & Toby Selway

CTW Summit - 29/02/2024


Requirements

See REQUIREMENTS.md.

Getting Started

run:

docker-compose up --build

Running Tests

make sure the docker-compose is up and run:

docker-compose exec gandalf_the_green task run 

note: if you have Taskfile installed you can just run (respectively):

task up

and

task test-docker

High-level Overview

graph TD;
    M(Mordor<br/>Posts Backend) --> G;
    I(Isengard<br/>Auth Backend) --> G;
    G(((Gateway<br/>Federation))) --> S(Shire<br/>Frontend);

Project Structure

├── gateway
├── isengard
├── mordor
│   ├── resolvers
│   │   └── post.js // Post resolver
│   ├── entities
│   │   └── Post.js // Post entity (for database)
│   ├── index.js
│   └── schema.gql // GraphQL schema
├── shire
├── test // Test suite to run against API
└── docker-compose.yaml

Applications

👥 Isengard

Authentication backend

Written in Golang, this application provides a very simple GraphQL API that serves the sole purpose of showcasing how federated subgraphs work. As such it just returns random quotes

🌿 Shire

Our beautiful frontend

Written in Nuxt (Vue.js) and styled with Tailwind CSS, this is where we query our gateway and display our data for our user to see.

We've set it up with a few reasonable queries, but once you've finished feel free to play around and build upon this any way you like.

⛏️ Mordor

Some other backend

This is where you come in fellow adventurer.

Your job is to implement what remains of this application in order to complete the product.

🔶 Gateway

Apollo Federation Gateway

A simple federation gateway implemented in JS with ApolloServer.

This aggregates data from Isengard and Mordor and provides it under a single GraphQL API so that Shire can query it from one place.

📜 Test

A test suite for sanity

A set of tests that makes requests to the gateway, ensuring stuff works as it's supposed to. We hope you like TDD, as this will serve as your guide to success during our quest.

gql-middle-earth's People

Contributors

darvoid avatar

Watchers

 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.