Graphql: Difference between revisions

From bibbleWiki
Jump to navigation Jump to search
Line 1: Line 1:
== Introduction ==
== Introduction ==
This is a query language for your API.<br>
This is a query language for your API.<br>
== Example ==
A example Query and Response provides an example.
A example Query and Response provides an example.
[[File:GraphQL Example.png|800px|]]
[[File:GraphQL Example.png|800px|]]
Line 8: Line 9:
* Twitter
* Twitter
* Github
* Github
== Core Concepts ==
=== Data Types ===
* Int signed 32-bit integer
* Float signed double-precision floating-point value
* String utf8 character sequence
* Boolean true or false values
* ID Unique identifier, Used to re-fetch an object or a the key for a cache
=== Types ===
<syntaxhighlight lang="graphQL">
type Author {
  id: ID,
  firstName: String
  lastName: String
  rating: Float
  numOfCourses: Int
}
</syntaxhighlight>

Revision as of 02:54, 6 August 2020

Introduction

This is a query language for your API.

Example

A example Query and Response provides an example. It is used by

  • Facebook
  • PsyPal
  • Twitter
  • Github

Core Concepts

Data Types

  • Int signed 32-bit integer
  • Float signed double-precision floating-point value
  • String utf8 character sequence
  • Boolean true or false values
  • ID Unique identifier, Used to re-fetch an object or a the key for a cache

Types

type Author {
  id: ID,
  firstName: String
  lastName: String
  rating: Float
  numOfCourses: Int
}