This project is an example of Apollo Federation which implements multiple different type of databases

Overview

Apollo_fed_example

This microservices based application is an example of apollo federation which uses multiple different types of databases(polyglot persistence).

Getting Started

Frontend - is a flutter application which uses firebase authentication for users. & Backened has an apollo federated gateway which consists of 3 subgraphs for 3 different microservices:

  1. Accounts :- For maintaining user's personal details. This service uses Neo4j database .
  2. Posts :- This service is used when users want to upload photos and videos , so the record will contain photo-location, creation date, photo id etc. This service uses Google Firestore.
  3. Feeds :- This service is used when users want to see their uploaded posts or other's uploaded posts. This service uses MongoDB database.

Backened has following graphQL schema:

Each subgraph defines the types and fields that it is capable of (and should be responsible for) populating from its own back-end data store.

Here feed_service's subgraph referenced an entity Photo from post_service's subgraph. Because the Photo entity is defined in another subgraph, the feed_service subgraph needs to define a stub of it to make its own schema valid. The stub includes just enough information for the subgraph to know how to interact with a Photo: like keywords- "extend", "@key" & keyfield-"photo_id".

So if we query like this,

OUTPUT:

accounts_services fetches getuserData query fields, post_service fetches getuserPhoto fields and feed_service fetches getuserFeed fields. The gateway fetches the required "photo_id" and "photo_location" fields of getuserFeed query from the post_service subgraph and passes it to the feed_service subgraph.

So this way an apollo federated gateway implements polyglot persistence model.

You might also like...

Flutter Basic Sqflite Example

sqflite_demo A new Flutter application. Getting Started This project is a starting point for a Flutter application. A few resources to get you started

Sep 5, 2021

An example showing how to handle common scrolling gesture conflicts in Flutter.

An example showing how to handle common scrolling gesture conflicts in Flutter.

scroll_master An example showing how to handle common scrolling gesture conflicts in Flutter.

Nov 11, 2022

Flutter Home Service Application Example - Day 35

Flutter Home Service Application Example - Day 35

Flutter Home Service Application Example - Day 35

Dec 23, 2022

Flutter Wallet Application Example - Day 40

Flutter Wallet Application Example - Day 40

Flutter Wallet Application Example - Day 40

Dec 23, 2022

Example of how to create scenes with Rive content in Flutter

rive-centaur Example of how to create scenes with Rive content in Flutter! no_audio_apples.mov Getting Started This project is a starting point for a

Nov 6, 2022

Example of injectable package and get it

inject_sample A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if

Oct 13, 2021

Web example for the ApolloVM Dart package.

ApolloVM - Web Example This is a Web example for the ApolloVM Dart package. Live Example You can see a live example at: https://apollovm.github.io/apo

Nov 7, 2021

Flutter Google Sheets Example and Neumorphic Design

Flutter Google Sheets Example and Neumorphic Design

Flutter Google Sheets Example and Neumorphic Design Google Sheet is a web-based spreadsheet application created by Google. Google Sheet allows collabo

Jul 26, 2022

A basic demo example for integrating between Appwrite & Flutter 💙

A basic demo example for integrating between Appwrite & Flutter 💙

🔖 Todo With Flutter A simple todo app built with Flutter and Appwrite 🎬 Getting Started Appwrite is an end-to-end backend server for Web, Mobile, Na

Dec 15, 2022
Owner
null
Flutter app demo multiple call with WebRTC and SFUs Architecture

Video Call Flutter App (SFUs Architecture) ?? Description: This is sandbox video call application using Flutter and WebRTC. SFUs – Selective Forwardin

Dao Hong Vinh 15 Dec 5, 2022
A simple app, with multiple pages and shows final output

quizapp A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this

Anmol Guragain 1 Nov 4, 2021
3 different demos showing how to use bloc concurrency, before and after the Bloc 7.2.0 update.

Bloc Concurrency Demos 3 different scenarios demonstrating how to structure blocs to take advantage of concurrent event processing in Bloc 7.2/8.0. Ea

Very Good Ventures 64 Nov 30, 2022
Dogs Explorer - An app for purshasing and exploring different breeds of dogs

Bloc is a fantanstic state mangement approach in flutter — with bloc pattern we would be able to create very high quality and maintainable code if implemented right because bloc uses design pattern which we are most familiar with. This project would be used to show how well we can utilize bloc by building an app that shows dogs according to breeds, their characteristics and several images of dogs.

null 8 Oct 31, 2022
A flutter musical app showing different sounds in the app

Xylophone_App_With_BuildKeyFunc A new Flutter project. A musical app showing different sounds in the app. Build key function is made in this app to si

Avinandan Bose 1 Mar 22, 2022
A musical Flutter app showing different sounds in the app

Xylophone_App A new Flutter project. A musical app showing different sounds in the app. Getting Started This project is a starting point for a Flutter

Avinandan Bose 2 Sep 9, 2022
A new Flutter App where different types of quiz demonstrated

Quizzler_App A new Flutter project.A new Flutter App where different types of quiz demonstrated . Getting Started This project is a starting point for

Avinandan Bose 1 Mar 27, 2022
An app to display Meals according to different Cusines alongwith various filters available

An app to display Meals according to different Cusines alongwith various filters available

Amartya Yadav 3 Jul 4, 2022
Getx Pattern example

Getx Pattern example

Kauê Murakami 17 Oct 28, 2022
A basic demo example for integrating between Appwrite & Flutter 💙

?? Quiz With Flutter A simple Quiz App built with Flutter and Appwrite ?? Getting Started ?? Install Appwrite Follow our simple Installation Guide to

Appwrite 35 Nov 22, 2022