All Projects β†’ trevorblades β†’ Countries

trevorblades / Countries

Licence: mit
🌎 Public GraphQL API for information about countries

Programming Languages

javascript
184084 projects - #8 most used programming language
languages
34 projects

Projects that are alternatives of or similar to Countries

Typegql
Create GraphQL schema with TypeScript classes.
Stars: ✭ 415 (+166.03%)
Mutual labels:  api, graphql, graphql-api, schema
Villus
🏎 A tiny and fast GraphQL client for Vue.js
Stars: ✭ 378 (+142.31%)
Mutual labels:  api, graphql, apollo, graphql-api
Postgraphile
GraphQL is a new way of communicating with your server. It eliminates the problems of over- and under-fetching, incorporates strong data types, has built-in introspection, documentation and deprecation capabilities, and is implemented in many programming languages. This all leads to gloriously low-latency user experiences, better developer experiences, and much increased productivity. Because of all this, GraphQL is typically used as a replacement for (or companion to) RESTful API services.
Stars: ✭ 10,967 (+6930.13%)
Mutual labels:  api, graphql, graphql-api, schema
Graphql Cli
πŸ“Ÿ Command line tool for common GraphQL development workflows
Stars: ✭ 1,814 (+1062.82%)
Mutual labels:  graphql, apollo, schema
Babel Plugin Import Graphql
Enables import syntax for .graphql and .gql files
Stars: ✭ 284 (+82.05%)
Mutual labels:  graphql, apollo, schema
Graphback
Graphback - Out of the box GraphQL server and client
Stars: ✭ 323 (+107.05%)
Mutual labels:  graphql, apollo, schema
Grand Stack Starter
Simple starter project for GRANDstack full stack apps
Stars: ✭ 419 (+168.59%)
Mutual labels:  api, graphql, apollo
Searchkit
GraphQL API & React UI components for Elasticsearch. The easiest way to build a great search experience
Stars: ✭ 4,338 (+2680.77%)
Mutual labels:  graphql, apollo, graphql-api
Rick And Morty Api
The Rick and Morty API
Stars: ✭ 542 (+247.44%)
Mutual labels:  api, graphql, graphql-api
Graphql Music
🎸A workshop in building a GraphQL API
Stars: ✭ 33 (-78.85%)
Mutual labels:  api, graphql, graphql-api
Api Platform
Create REST and GraphQL APIs, scaffold Jamstack webapps, stream changes in real-time.
Stars: ✭ 7,144 (+4479.49%)
Mutual labels:  api, graphql, graphql-api
Omdb Graphql Wrapper
πŸš€ GraphQL wrapper for the OMDb API
Stars: ✭ 45 (-71.15%)
Mutual labels:  api, graphql, apollo
Wp Graphql
πŸš€ GraphQL API for WordPress
Stars: ✭ 3,097 (+1885.26%)
Mutual labels:  api, graphql, graphql-api
Conventions
GraphQL Conventions Library for .NET
Stars: ✭ 198 (+26.92%)
Mutual labels:  api, graphql, schema
Graphql2rest
GraphQL to REST converter: automatically generate a RESTful API from your existing GraphQL API
Stars: ✭ 181 (+16.03%)
Mutual labels:  api, graphql, graphql-api
Storefront Api
Storefront GraphQL API Gateway. Modular architecture. ElasticSearch included. Works great with Magento1, Magento2, Spree, OpenCart, Pimcore and custom backends
Stars: ✭ 180 (+15.38%)
Mutual labels:  api, graphql, graphql-api
React Apollo Form
Build React forms based on GraphQL APIs.
Stars: ✭ 178 (+14.1%)
Mutual labels:  graphql, apollo, graphql-api
Pop
Monorepo of the PoP project, including: a server-side component model in PHP, a GraphQL server, a GraphQL API plugin for WordPress, and a website builder
Stars: ✭ 160 (+2.56%)
Mutual labels:  api, graphql, graphql-api
Type Graphql
Create GraphQL schema and resolvers with TypeScript, using classes and decorators!
Stars: ✭ 6,864 (+4300%)
Mutual labels:  api, graphql, schema
Apollo
Meteor & Apollo integration
Stars: ✭ 87 (-44.23%)
Mutual labels:  graphql, apollo, graphql-api

globe

Countries GraphQL API

Build Status Contributor Covenant Twitter Follow

A public GraphQL API for information about countries, continents, and languages. This project uses Countries List and provinces as data sources, so the schema follows the shape of that data, with a few exceptions:

  1. The codes used to key the objects in the original data are available as a code property on each item returned from the API.
  2. The country.continent and country.languages are now objects and arrays of objects, respectively.
  3. Each Country has an array of states populated by their states/provinces, if any.

Writing queries

{
  country(code: "BR") {
    name
    native
    capital
    emoji
    currency
    languages {
      code
      name
    }
  }
}

The above GraphQL query will produce the following JSON response:

{
  "data": {
    "country": {
      "name": "Brazil",
      "native": "Brasil",
      "capital": "BrasΓ­lia",
      "emoji": "πŸ‡§πŸ‡·",
      "currency": "BRL",
      "languages": [
        {
          "code": "pt",
          "name": "Portuguese"
        }
      ]
    }
  }
}

Docs

Check out the playground to explore the schema and test out some queries.

Examples

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].