The service provides a single HTTP POST endpoint /graphql that accepts well-formed GraphQL queries against the Star Wars data set used by GraphQL.js.
Nosql arangodb 27.8m capitalsawersventurebeat install#
If you are running ArangoDB 2.8 you can install the Foxx service demo-graphql from the Store. Whereas in a traditional REST API accessing the names of the friends would likely require additional API calls and filtering the responses to certain fields would either require proprietary extensions or additional endpoints. using an HTTP endpoint) and passes the schema and query to the GraphQL implementation, which validates and executes the query, later returning the output as JSON.
For web applications and JavaScript mobile apps you can use either GraphQL.js or graphql-sync to make it easier to generate these queries by escaping parameters. The client sends queries to the GraphQL API using the GraphQL query language. Additionally it defines how the fields are resolved to values using a backend (which can be anything from a simple function call, a remote web service or accessing a database collection). The GraphQL schema is implemented on the server using a library like graphql-sync and defines the types supported by the API, the names of fields that can be queried and the types of queries that can be made. Generally GraphQL APIs consist of three parts: GraphQL is a query language that bears some superficial similarities with JSON. With the general availability of ArangoDB 2.8 you can now use GraphQL in ArangoDB using Foxx services (JavaScript in the database). While working on the 2.8 release of our NoSQL database we experimented with GraphQL and published an ArangoDB-compatible wrapper for GraphQL.js. Users have been asking us how they can try out GraphQL with ArangoDB. Recently projects outside Facebook like Meteor have also begun to embrace GraphQL. Following the original announcement alongside Relay, Facebook has published an official specification and reference implementation in JavaScript. GraphQL is a query language created by Facebook for modern web and mobile applications as an alternative to REST APIs.