From BC$ MobileTV Wiki
Jump to: navigation, search

GraphQL is a query language meant to be used for APIs, and a server-side runtime for executing queries by using a type system you define for your data. GraphQL isn't tied to any specific database or storage engine and is instead backed by your existing code and data.

A GraphQL service is created by defining types and fields on those types, then providing functions for each field on each type. For example, a GraphQL service that tells us who the currently logged in user is on my device (i.e. "me") as well as that user's name might look something like this:

type Query {
  me: User
type User {
  id: ID
  name: String

Along with functions for each field on each type:

function Query_me(request) {
  return request.auth.user;
function User_name(user) {
  return user.getName();




[3] [4]

[5] [6]

[7] [8] [9]

External Links


  1. How I started testing my Queries and Mutations on GraphQL:
  2. Getting started with GraphQL in Java:
  3. GraphQL And REST Differences Explained With Burgers:
  4. GraphQL vs. REST, Explained Using Pizza:
  5. How to test a GraphQL API?:
  6. GraphQL Test Automation with KarateDSL:
  7. Why You Should Disable GraphQL Introspection In Production – GraphQL Security:
  8. GraphQL Ruby client/server -- Disabling "introspection" (schema self-describing/discovery):
  9. How to Disable Schema Introspection in graphql-spqr-spring-boot-starter:

See Also

SQL | NoSQL | JS | Java | RDF | SPARQL | API