Git Product home page Git Product logo

confql's Introduction

ConfQL Schema Stitching Demo

๐Ÿ’ป๐Ÿงต

Explanation

GraphQL schema stitching is an excellent way to enhance APIs with a wealth of extra data. The concept is simple and the execution is straight forward. The idea is simply to access two or more APIs in one.

We will combine 4 services: Yelp Google Darksky GraphCMS

The execution involves four steps.

  1. Introspect the remote APIs. Finding out what schema structure you have to work with.
  2. Handle type name collisions.
  3. Associate which fields get added to which types.
  4. Resolve the data.

Stitching Gotchas

It's not always a good idea to stitch your schemas together. Here are some reasons why you might not want to stitch.

  • The endpoints are not versioned or reliable and might change on you without proper notice.
  • One endpoint for all your data also means one endpoint to take down the project.
  • Difference in TTL for your data.

Stitch Some of the Things!

Withe the gotchas in mind, stitching is a great way to combine multiple data sets into a single distributable, explorable and maintainable API. Particularly in API design for MVP projects or one off sites, it's a great way to get the developers up and running, fast.

Requirements

API Requirements
Geocode API You need to build your own Geocode API. You can run this repo locally, or host it with Zeit Now.
Content API Feel free to use the one we have provided! No limits!
Yelp API Register for a yelp authentication key and add it to a .env file. YELP_TOKEN=...
  1. Install dependencies with yarn
  2. Run the server with yarn start

Happy coding!

confql's People

Contributors

motleydev avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.