Giter VIP home page Giter VIP logo

lorem-graphql's Introduction

Lorem-GraphQL

Simple GtraphQL API for Lorem Ipsum Paragraph. Whats inside?

  • simple GraphQL schema.
  • Rich API ;)
    • fetch paragraphs
    • sentences
    • words
    • letters

How to start?

npm install
# or
yarn
npm start # and follow instructions

Working example

https://lorem-graphql.now.sh

I ♥️ u zeit.co

Examples

GraphQL Editor will help you build queries but here you can find few examples.

Fetch whole text

{
  lorem {
    value
  }
}

Fetch second sentence

{
  lorem {
    sentence(index: 1) {
      value
    }
  }
}

Fetch all letters in second word of first sentence

{
  lorem {
    sentence(index: 0) {
      word(index: 1) {
        letters {
          value
        }
      }
    }
  }
}

If you lost, just try :) GraphQL Editor provides autocompletion and syntaxt validation.

What's next?

I don't know :) In near future I want to add few more complex examples like aync resolves. Maybe we can fetch words definitions from online dictionaries. Ideas?

lorem-graphql's People

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.