Skip to content

virtualforce/GraphQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

GraphQL

GraphQL is the library by facebook to provide easy access to data. it is the replacement of REST APIs. It is the declarative wasy to access data unlike imperative way like REST. we just told graphql what we want and it is the headache of Graphql how to reterive data.GraphQL is an application layer query language from Facebook. With GraphQL, you can define your backend as a well-defined graph-based schema. Then client applications can query your dataset as they are needed.

GraphQL is the specification, there exist many reference implementation

Ruby Libraries

  • graphql-ruby - Ruby implementation of Facebook's GraphQL.
  • graphql-relay-ruby - Relay helpers for GraphQL & Ruby.
  • graphql-parser - A small ruby gem wrapping the libgraphqlparser C library for parsing GraphQL.
  • graphql-client - A Ruby library for declaring, composing and executing GraphQL queries.
  • graphql-batch - A query batching executor for the graphql gem.

PHP Libraries

read more for reference implementation

https://github.com/chentsulin/awesome-graphql/edit/master/README.md

Query Structure

  latestPost {
    title,
    summary
  }
}```
# Query result
```{
  "data": {
    "latestPost": {
      "title": "New Feature: Tracking Error Status with Kadira",
      "summary": "Lot of users asked us to add a feature to set status for errors in the Kadira Error Manager. Now, we've that functionality."
    }
  }
}```
# read more on how to use graphql
https://learngraphql.com/basics/introduction