Code Monkey home page Code Monkey logo

usda-rest-api-to-graphql's Introduction

United States Department of Agriculture GraphQL Server

Operation Refactor America's wrapped United States Bureau Census Bureau's REST API with GraphQL Server. The REST endpoints have been mapped as GraphQL types and resolvers. Note: Using this API requires a free API Key, which can be acquired at https://ridb.recreation.gov/?action=register. Once your API Key is received, go to ./config/config.js and enter the API key into APIKEY.

If you'd like to contribute to this project, please fork this repository over and submit a pull request.

On This Page

About Operation Refactor America

Operation Refactor America is a not associated with any government agency, but our goal is to empower citizens with transparent data. Only a fraction of government agencies provide public APIs, which are usually poorly documented, built on archaic REST architecture, and contains scattered data. Our mission is to retrieve that valuable data and convert them into an intuitive and modern API using GraphQL Server.

About the Data

The data comes directly from the United States Department of Agriculture's REST API. The REST endpoints have been mapped as GraphQL types and resolvers. A summary of endpoints and documentation can be found here: http://usda.github.io/RIDB/

GraphQL Server: Apollo Server

This GraphQL server uses apollo-server-express and not Facebook's graphql-express.

GraphQL Server: Start

npm run server

GraphQL Server: Query

http://localhost:4000/graphiql

GraphQL Server: Testing API Endpoints

npm jest

API Data:

GraphQL Query Examples

Example #1: Number of all Burglary Victims (Annually)

Query:

Example #2: Retrieve Agency by Originating Agency Identification (ORI)

Query:

GraphQL Result:

Example #3: Number of all Homicide Victims in the Arizona by Age Range (Annually)

Query:

GraphQL Result:

usda-rest-api-to-graphql's People

Contributors

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